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
6e8b5ad9
Commit
6e8b5ad9
authored
14 years ago
by
Sander Mathijs van Veen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed GCC incompatiblity.
parent
66f10d33
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modsim/ass2/q3.c
+7
-4
7 additions, 4 deletions
modsim/ass2/q3.c
modsim/ass2/q5.c
+4
-4
4 additions, 4 deletions
modsim/ass2/q5.c
modsim/ass2/report.tex
+5
-3
5 additions, 3 deletions
modsim/ass2/report.tex
with
16 additions
and
11 deletions
modsim/ass2/q3.c
+
7
−
4
View file @
6e8b5ad9
...
...
@@ -16,16 +16,19 @@ double df(double x) {
}
int
main
(
void
)
{
unsigned
int
steps
;
unsigned
int
steps
=
0
;
double
tmp
=
bisec
(
&
f
,
1
,
2
,
EPSILON
,
&
steps
);
printf
(
"Square root of 2 using bisection method: %.20f (%d steps)
\n
"
,
bisec
(
&
f
,
1
,
2
,
EPSILON
,
&
steps
)
,
steps
);
tmp
,
steps
);
tmp
=
newton_raphson
(
&
f
,
&
df
,
1
.
4
,
EPSILON
,
&
steps
,
100000
);
printf
(
"Square root of 2 using Newton-Raphson method: %.20f (%d steps)
\n
"
,
newton_raphson
(
&
f
,
&
df
,
1
.
4
,
EPSILON
,
&
steps
,
100000
)
,
steps
);
tmp
,
steps
);
tmp
=
regula_falsi
(
&
f
,
1
,
2
,
EPSILON
,
&
steps
,
100000
);
printf
(
"Square root of 2 using the Regula Falsi method: %.20f (%d steps)
\n
"
,
regula_falsi
(
&
f
,
1
,
2
,
EPSILON
,
&
steps
,
100000
)
,
steps
);
tmp
,
steps
);
return
0
;
}
This diff is collapsed.
Click to expand it.
modsim/ass2/q5.c
+
4
−
4
View file @
6e8b5ad9
...
...
@@ -28,17 +28,17 @@ double f2(double x) {
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
{
printf
(
"Usage: %s STEPS"
,
argv
[
0
]);
printf
(
"Usage: %s STEPS
\n
"
,
argv
[
0
]);
return
-
1
;
}
PRINT_INTEGRALS
(
f1
,
0
,
1
,
(
M_E
-
1
)
/
M_E
);
puts
(
""
);
PRINT_INTEGRALS
(
f2
,
0
,
2
,
1
-
3
/
pow
(
M_E
,
2
));
PRINT_INTEGRALS
(
f2
,
0
,
2
,
1
-
3
/
pow
(
M_E
,
2
));
puts
(
""
);
PRINT_INTEGRALS
(
f2
,
0
,
20
,
1
-
21
/
pow
(
M_E
,
20
));
PRINT_INTEGRALS
(
f2
,
0
,
20
,
1
-
21
/
pow
(
M_E
,
20
));
puts
(
""
);
PRINT_INTEGRALS
(
f2
,
0
,
200
,
1
-
201
/
pow
(
M_E
,
200
));
PRINT_INTEGRALS
(
f2
,
0
,
200
,
1
-
201
/
pow
(
M_E
,
200
));
puts
(
""
);
PRINT_INTEGRALS
(
sin
,
0
,
8
*
M_PI
,
0
.
0
);
...
...
This diff is collapsed.
Click to expand it.
modsim/ass2/report.tex
+
5
−
3
View file @
6e8b5ad9
\documentclass
[10pt,a4paper]
{
article
}
\usepackage
{
float,url,graphicx,booktabs
}
\documentclass
[10pt,a4paper]
{
article
}
% {{{
\usepackage
{
float,url,graphicx,booktabs
}
\usepackage
[dutch]
{
babel
}
% }}}
\title
{
Modelleren, Simuleren
\&
Contin
\"
ue Wiskunde
\\
Assignment 2: Differentiation, roots and Integration
}
\author
{
Tadde
\"
us Kroes (6054129)
\and
Sander van Veen (6167969)
}
...
...
@@ -96,7 +98,6 @@ beoogde nauwkeurigheid.
% }}}
\section
{
Newton-Raphson
}
% {{{
\label
{
sec:Newton-Raphson
}
...
...
@@ -203,3 +204,4 @@ t/m 10 jaar).}
% }}}
\end{document}
% vim: foldmethod=marker:
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