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
1dc110f0
Commit
1dc110f0
authored
Mar 01, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed print method and accurucy in ass5.
parent
6fb14c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
modsim/ass2/q5.c
modsim/ass2/q5.c
+2
-2
No files found.
modsim/ass2/q5.c
View file @
1dc110f0
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include "func_ptr.h"
#include "func_ptr.h"
#include "integral.h"
#include "integral.h"
#define DX 1e-
3
#define DX 1e-
5
double
f1
(
double
x
)
{
double
f1
(
double
x
)
{
return
pow
(
M_E
,
-
x
);
return
pow
(
M_E
,
-
x
);
...
@@ -15,7 +15,7 @@ double f2(double x) {
...
@@ -15,7 +15,7 @@ double f2(double x) {
}
}
#define PRINT_INTEGRAL(func, method, a, b) (printf(#func " from " #a " to " \
#define PRINT_INTEGRAL(func, method, a, b) (printf(#func " from " #a " to " \
#b " using %-19s %.11
f
\n", #method " method:", integral(&func, &method, a, b, DX)))
#b " using %-19s %.11
e
\n", #method " method:", integral(&func, &method, a, b, DX)))
int
main
(
void
)
{
int
main
(
void
)
{
PRINT_INTEGRAL
(
f1
,
rectangle
,
0
,
1
);
PRINT_INTEGRAL
(
f1
,
rectangle
,
0
,
1
);
...
...
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