Skip to content

Commit 0525ed2

Browse files
committedJul 21, 2022
examples - savage print define
1 parent 5a3a805 commit 0525ed2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎examples/embedded/savage.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
Benchmark math performance using CP/M target and z88dk-ticks
2323
2424
SCCZ80
25-
genmath -> 400944733 cycles (7 digits accuracy) % zcc +cpm -lndos -lm -create-app savage.c -osavage // -DPRINT
26-
math48 -> 277174281 cycles (7 digits accuracy) % zcc +cpm -lndos -lmath48 -create-app savage.c -osavage // -DPRINT
27-
math32 -> 127461377 cycles (5 digits accuracy) % zcc +cpm -lndos --math32 -create-app savage.c -osavage // -DPRINT
28-
am9511 -> 33010850 cycles (5 digits accuracy) % zcc +cpm -lndos --am9511 -create-app savage.c -osavage // -DPRINT
25+
genmath -> 400944733 cycles (7 digits accuracy) % zcc +cpm -lndos -lm -create-app savage.c -osavage // -DNOPRINT
26+
math48 -> 277174281 cycles (7 digits accuracy) % zcc +cpm -lndos -lmath48 -create-app savage.c -osavage // -DNOPRINT
27+
math32 -> 127461377 cycles (5 digits accuracy) % zcc +cpm -lndos --math32 -create-app savage.c -osavage // -DNOPRINT
28+
am9511 -> 33010850 cycles (5 digits accuracy) % zcc +cpm -lndos --am9511 -create-app savage.c -osavage // -DNOPRINT
2929
3030
SDCC
31-
math48 -> 278043533 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos -lmath48 -create-app savage.c -osavage // -DPRINT
32-
math32 -> 127380163 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --math32 -create-app savage.c -osavage // -DPRINT
33-
am9511 -> 32929636 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --am9511 -create-app savage.c -osavage // -DPRINT
31+
math48 -> 278043533 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos -lmath48 -create-app savage.c -osavage // -DNOPRINT
32+
math32 -> 127380163 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --math32 -create-app savage.c -osavage // -DNOPRINT
33+
am9511 -> 32929636 cycles (5 digits accuracy) % zcc +cpm -compiler=sdcc -lndos --am9511 -create-app savage.c -osavage // -DNOPRINT
3434
3535
Note the loss of accuracy moving from the (genmath or math48) 40 bit mantissa to (math32 or am9511) IEEE 23 bit mantissa,
3636
when EITHER sdcc OR math32 is used.
@@ -67,7 +67,7 @@ int main(void)
6767
for(i = 0; i < ILOOP; ++i)
6868
{
6969
aprime = tan(atan(exp(log(sqrt(a * a)))));
70-
#ifdef PRINT
70+
#ifndef NOPRINT
7171
printf("A = %f -> %f\n", a, aprime);
7272
#endif
7373
a += 1.0;

0 commit comments

Comments
 (0)
Please sign in to comment.