Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uva
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
uva
Commits
8ec70482
Commit
8ec70482
authored
14 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Added Kahan documentation.
parent
db6a27c2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
simmod/ass1/report.tex
+13
-6
13 additions, 6 deletions
simmod/ass1/report.tex
with
13 additions
and
6 deletions
simmod/ass1/report.tex
+
13
−
6
View file @
8ec70482
...
@@ -113,12 +113,12 @@ We've calculated $\sum_{i=1}^{N}\frac{1}{i}$ for $N = 10^8$ and $N = 2 \cdot
...
@@ -113,12 +113,12 @@ We've calculated $\sum_{i=1}^{N}\frac{1}{i}$ for $N = 10^8$ and $N = 2 \cdot
\begin{table}
[H]
\begin{table}
[H]
\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
.
8079
2
$
&
$
18
.
997
90
$
\\
\texttt
{
float
}
&
$
10
^
8
$
&
$
15
.
40368
3
$
&
$
18
.
8079
19
$
&
$
18
.
997
896
$
\\
\texttt
{
float
}
&
$
2
\cdot
10
^
8
$
&
$
15
.
40368
$
&
$
18
.
8079
2
$
&
$
19
.
69104
$
\\
\texttt
{
float
}
&
$
2
\cdot
10
^
8
$
&
$
15
.
40368
3
$
&
$
18
.
8079
19
$
&
$
19
.
69104
4
$
\\
\texttt
{
double
}
&
$
10
^
8
$
&
$
18
.
997
90
$
&
$
18
.
997
90
$
&
\\
\texttt
{
double
}
&
$
10
^
8
$
&
$
18
.
997
896
$
&
$
18
.
997
896
$
&
\\
\texttt
{
double
}
&
$
2
\cdot
10
^
8
$
&
$
19
.
69104
$
&
$
19
.
69104
$
&
\\
\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}
% }}}
% }}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment