Skip to content
Snippets Groups Projects
Commit 0ee657f5 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Added all source code to report.

parent 5823ee31
No related branches found
No related tags found
No related merge requests found
...@@ -10,3 +10,6 @@ fd* ...@@ -10,3 +10,6 @@ fd*
pr pr
floating_point.tex floating_point.tex
extra_precision.tex extra_precision.tex
speed.tex
sum.tex
Makefile.tex
...@@ -6,7 +6,14 @@ OPS=ADD DIV MULT SQRT ...@@ -6,7 +6,14 @@ OPS=ADD DIV MULT SQRT
all: fp speed highlight report.pdf sum pr all: fp speed highlight report.pdf sum pr
highlight: floating_point.tex extra_precision.tex highlight: floating_point.tex extra_precision.tex \
speed.tex sum.tex Makefile.tex
s%.tex: s%.c
pygmentize -O style=colorful -o $@ $^
Makefile.tex: Makefile
pygmentize -O style=colorful -o $@ $^
extra_precision.tex: extra_precision.c extra_precision.tex: extra_precision.c
pygmentize -O style=colorful -o $@ $^ pygmentize -O style=colorful -o $@ $^
...@@ -20,11 +27,11 @@ floating_point.tex: floating_point.c ...@@ -20,11 +27,11 @@ floating_point.tex: floating_point.c
speed: speed.c speed: speed.c
for t in $(SPEED_TYPES); do \ for t in $(SPEED_TYPES); do \
for o in $(OPS); do \ for o in $(OPS); do \
sed "s#{TYPE}#$$t#" $^ | sed "s#{OP}#$$o#" > speed.$$t.$$o.c; \ sed "s#{TYPE}#$$t#" $^ | sed "s#{OP}#$$o#" > speed.$$t.$$o.c; \
$(CC) $(FLAGS) -o speed.$$t.$$o speed.$$t.$$o.c; \ $(CC) $(FLAGS) -o speed.$$t.$$o speed.$$t.$$o.c; \
rm speed.$$t.$$o.c; \ rm speed.$$t.$$o.c; \
done; \ done; \
done; done;
touch $@ touch $@
......
...@@ -20,7 +20,7 @@ int main(void) { ...@@ -20,7 +20,7 @@ int main(void) {
if( last_e < e + 1.f / (i*8) ) if( last_e < e + 1.f / (i*8) )
printf("more precision detected!\n"); printf("more precision detected!\n");
printf("diff:\n%.80f\n%.80f \n", last_e, e + 1.f / (i*8)); printf("first: %.80f\nlast : %.80f \n", last_e, e + 1.f / (i*8));
return 0; return 0;
} }
...@@ -171,9 +171,8 @@ produces this output: ...@@ -171,9 +171,8 @@ produces this output:
\begin{verbatim} \begin{verbatim}
$ ./pr $ ./pr
more precision detected! more precision detected!
diff: first: 2.6910297870635986328125000000000000000000000000000000000
2.6910297870635986328125000000000000000000000000000000000 last : 2.6910298253667153112189680541632696986198425292968750000
2.6910298253667153112189680541632696986198425292968750000
\end{verbatim} \end{verbatim}
% }}} % }}}
...@@ -187,6 +186,20 @@ diff: ...@@ -187,6 +186,20 @@ diff:
% }}} % }}}
\section{speed.c} % {{{
\label{sec:speed.c}
\input{speed}
% }}}
\section{sum.c} % {{{
\label{sec:sum.c}
\input{sum}
% }}}
\section{extra\_precision.c} % {{{ \section{extra\_precision.c} % {{{
\label{sec:extra_precision.c} \label{sec:extra_precision.c}
...@@ -194,5 +207,11 @@ diff: ...@@ -194,5 +207,11 @@ diff:
% }}} % }}}
\section{Makefile} % {{{
\label{sec:Makefile}
\input{Makefile}
% }}}
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment