Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
a27f08a3
Commit
a27f08a3
authored
Feb 09, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://vo20.nl/git/uva
parents
6bf9f8ad
8ec70482
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
simmod/ass1/report.tex
simmod/ass1/report.tex
+13
-6
No files found.
simmod/ass1/report.tex
View file @
a27f08a3
...
@@ -115,10 +115,10 @@ We've calculated $\sum_{i=1}^{N}\frac{1}{i}$ for $N = 10^8$ and $N = 2 \cdot
...
@@ -115,10 +115,10 @@ We've calculated $\sum_{i=1}^{N}\frac{1}{i}$ for $N = 10^8$ and $N = 2 \cdot
\begin{tabular}
{
l|llll
}
\begin{tabular}
{
l|llll
}
Type
&
N
&
Forward
&
Backward
&
Kahan
\\
Type
&
N
&
Forward
&
Backward
&
Kahan
\\
\hline
\hline
\texttt
{
float
}
&
$
10
^
8
$
&
$
15
.
40368
$
&
$
18
.
80792
$
&
$
18
.
99790
$
\\
\texttt
{
float
}
&
$
10
^
8
$
&
$
15
.
40368
3
$
&
$
18
.
807919
$
&
$
18
.
997896
$
\\
\texttt
{
float
}
&
$
2
\cdot
10
^
8
$
&
$
15
.
40368
$
&
$
18
.
80792
$
&
$
19
.
6910
4
$
\\
\texttt
{
float
}
&
$
2
\cdot
10
^
8
$
&
$
15
.
40368
3
$
&
$
18
.
807919
$
&
$
19
.
69104
4
$
\\
\texttt
{
double
}
&
$
10
^
8
$
&
$
18
.
997
90
$
&
$
18
.
99790
$
&
\\
\texttt
{
double
}
&
$
10
^
8
$
&
$
18
.
997
896
$
&
$
18
.
997896
$
&
\\
\texttt
{
double
}
&
$
2
\cdot
10
^
8
$
&
$
19
.
69104
$
&
$
19
.
6910
4
$
&
\\
\texttt
{
double
}
&
$
2
\cdot
10
^
8
$
&
$
19
.
69104
4
$
&
$
19
.
69104
4
$
&
\\
\end{tabular}
\end{tabular}
\caption
{
Results of various summation approaches on floats and doubles.
}
\caption
{
Results of various summation approaches on floats and doubles.
}
\end{table}
\end{table}
...
@@ -150,7 +150,14 @@ Type & N & Forward & Backward & Kahan\\
...
@@ -150,7 +150,14 @@ Type & N & Forward & Backward & Kahan\\
\frac
{
1
}{
2
\cdot
10
^
8
}
]
$
are also represented as zero and therefore not added
\frac
{
1
}{
2
\cdot
10
^
8
}
]
$
are also represented as zero and therefore not added
to the result.
to the result.
\item
To improve the precision of the
\texttt
{
float
}
data type summation, we
\item
To improve the precision of the
\texttt
{
float
}
data type summation, we
implemented the Kahan summation algorithm.
implemented the Kahan summation algorithm. This algorithm basically divides the
summation in a higher- and lower-order part. The lower-order part is used to
compensate for the error at each summation. See
\url
{
http://en.wikipedia.org/wiki/Kahan
\_
summation
\_
algorithm
}
for more
information about this algorithm. The results are in the last column as the
table, we can see that the algorithm yields the correct number. We know this
because they are equal to the result of the
\texttt
{
double
}
summations (but
rounded to the precision of a
\texttt
{
float
}
, of course).
\end{itemize}
\end{itemize}
% }}}
% }}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment