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
62ef2c0d
Commit
62ef2c0d
authored
14 years ago
by
Sander Mathijs van Veen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed typo's
parent
7a7b83d6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
simmod/ass1/Makefile
+1
-1
1 addition, 1 deletion
simmod/ass1/Makefile
simmod/ass1/report.tex
+4
-4
4 additions, 4 deletions
simmod/ass1/report.tex
with
5 additions
and
5 deletions
simmod/ass1/Makefile
+
1
−
1
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
$@
$^
...
...
This diff is collapsed.
Click to expand it.
simmod/ass1/report.tex
+
4
−
4
View file @
62ef2c0d
...
...
@@ -122,20 +122,20 @@ Type & N & Forward & Backward \\
\noindent
\textbf
{
Observations
}
\begin{itemize}
\item
Since the results for the
\texttt
{
double
}
datatype are e
a
qual for both
\item
Since the results for the
\texttt
{
double
}
data
type are equal 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
...
...
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