blob: 54193df5c8e1915cc556ba6480304056ca7cf8a0 (
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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
CC=gcc
CFLAGS=-O3 -mcpu=ev67 -mieee
CCC=ccc
CCFLAGS=-O3 -host
TESTS= sin_glibc sin_cpml sin_ccc \
cos_glibc cos_cpml cos_ccc \
tan_glibc tan_cpml tan_ccc \
sinh_glibc sinh_cpml sinh_ccc \
cosh_glibc cosh_cpml cosh_ccc \
tanh_glibc tanh_cpml tanh_ccc \
asin_glibc asin_cpml asin_ccc \
acos_glibc acos_cpml acos_ccc \
atan_glibc atan_cpml atan_ccc \
asinh_glibc asinh_cpml asinh_ccc \
acosh_glibc acosh_cpml acosh_ccc \
atanh_glibc atanh_cpml atanh_ccc \
floor_glibc floor_cpml floor_ccc \
ceil_glibc ceil_cpml ceil_ccc \
round_glibc round_cpml round_ccc \
trunc_glibc trunc_cpml trunc_ccc \
log_glibc log_cpml log_ccc \
log10_glibc log10_cpml log10_ccc \
log2_glibc log2_cpml log2_ccc \
log1p_glibc log1p_cpml log1p_ccc \
exp_glibc exp_cpml exp_ccc \
expm1_glibc expm1_cpml expm1_ccc \
exp2_glibc exp2_cpml exp2_ccc
all: $(TESTS)
test: $(TESTS)
./test.sh $(TESTS) > results.csv
clean:
rm -f $(TESTS) results.csv
rebuild: clean all
remake: rebuild
sin_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=sin -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
sin_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=sin -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
sin_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=sin -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
cos_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=cos -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
cos_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=cos -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
cos_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=sin -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
tan_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=tan -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
tan_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=tan -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
tan_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=tan -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
sinh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=sinh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
sinh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=sinh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
sinh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=sinh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
cosh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=cosh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
cosh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=cosh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
cosh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=cosh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
tanh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=tanh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lm
tanh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=tanh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
tanh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=tanh -DDOMAIN_START="-2.0*M_PI" -DDOMAIN_END="2.0*M_PI" $< -o $@ -lcpml
asin_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=asin -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
asin_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=asin -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
asin_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=asin -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
acos_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=acos -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
acos_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=acos -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
acos_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=acos -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
atan_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=atan -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
atan_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=atan -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
atan_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=atan -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
asinh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=asinh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
asinh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=asinh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
asinh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=asinh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
acosh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=acosh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
acosh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=acosh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
acosh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=acosh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
atanh_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=atanh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lm
atanh_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=atanh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
atanh_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=atanh -DDOMAIN_START="-1.0" -DDOMAIN_END="1.0" $< -o $@ -lcpml
floor_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=floor -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
floor_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=floor -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
floor_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=floor -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
ceil_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=ceil -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
ceil_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=ceil -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
ceil_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=ceil -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
round_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=round -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
round_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=round -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
round_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=round -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
trunc_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=trunc -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
trunc_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=trunc -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
trunc_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=trunc -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=log -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
log_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=log -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=log -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log10_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=log10 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
log10_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=log10 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log10_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=log10 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log2_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=log2 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
log2_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=log2 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log2_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=log2 -DDOMAIN_START="0.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log1p_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=log1p -DDOMAIN_START="-0.75" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
log1p_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=log1p -DDOMAIN_START="-0.75" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
log1p_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=log1p -DDOMAIN_START="-0.75" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
exp_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=exp -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
exp_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=exp -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
exp_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=exp -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
expm1_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=expm1 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
expm1_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=expm1 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
expm1_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=expm1 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
exp2_glibc: math.c
${CC} ${CFLAGS} -DFUNCTION=exp2 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lm
exp2_cpml: math.c
${CC} ${CFLAGS} -DFUNCTION=exp2 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
exp2_ccc: math.c
${CCC} ${CCFLAGS} -DFUNCTION=exp2 -DDOMAIN_START="-10.0" -DDOMAIN_END="10.0" -DINCREMENT="0.25" $< -o $@ -lcpml
|