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
62ef2c0d
Commit
62ef2c0d
authored
Feb 09, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typo's
parent
7a7b83d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
simmod/ass1/Makefile
simmod/ass1/Makefile
+1
-1
simmod/ass1/report.tex
simmod/ass1/report.tex
+4
-4
No files found.
simmod/ass1/Makefile
View file @
62ef2c0d
...
...
@@ -21,7 +21,7 @@ speed: speed.c
touch
$@
pr
:
extra_precision.o
$(CC)
$(FLAGS)
-o
$@
$^
$(CC)
$(FLAGS)
-
mfpmath
=
387
-O2
-
o
$@
$^
fp
:
floating_point.o
$(CC)
$(FLAGS)
-o
$@
$^
...
...
simmod/ass1/report.tex
View file @
62ef2c0d
...
...
@@ -122,20 +122,20 @@ Type & N & Forward & Backward \\
\noindent
\textbf
{
Observations
}
\begin{itemize}
\item
Since the results for the
\texttt
{
double
}
data
type are ea
qual for both
\item
Since the results for the
\texttt
{
double
}
data
type are e
qual for both
the forward and backward summation approach, we can say that these are the
correct results.
\item
For the
\texttt
{
float
}
data type, we observe that the backward approach
yields a higher result than the forward approach. This can be explained as
follows. When using the forward approach, we start with a small
$
i
$
, thus
with a large
$
1
/
i
$
. This means that the initial value of
\texttt
{
sum
}
is
large. The value will keep growing until
l
the significance of
$
1
/
i
$
is too
large. The value will keep growing until the significance of
$
1
/
i
$
is too
small to add to the result. From this point, no more
$
1
/
i
$
will be added to
the result because the significane of the individual numbers is too small.
the result because the significan
c
e of the individual numbers is too small.
However, the sum of the ignored numbers would be a large enough number to
add to the result. This is why the backward approach yields a higher number:
the sum of the ignored numbers is computed and later the larger numbers
are added. The remaining i
n
precision is probably due to rounding problems and
are added. The remaining i
m
precision is probably due to rounding problems and
the fact that
$
1
/
10
^
8
$
and a range of larger numbers are represented as
zeroes in
\texttt
{
float
}
representation and therefore not added to the
result. This problem does not occur when using the
\texttt
{
double
}
data type
...
...
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