Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Vytor Calixto
ICC
Commits
242164a0
Commit
242164a0
authored
9 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Lista 2 - exercício 26
parent
27693402
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
libmetodos/libPolinomios.c
+1
-1
1 addition, 1 deletion
libmetodos/libPolinomios.c
lista2/Makefile
+4
-1
4 additions, 1 deletion
lista2/Makefile
lista2/ex26.c
+13
-0
13 additions, 0 deletions
lista2/ex26.c
with
18 additions
and
2 deletions
libmetodos/libPolinomios.c
+
1
−
1
View file @
242164a0
...
@@ -19,5 +19,5 @@ void pxDpx(double *p, int n, double x, double *px, double *dpx) {
...
@@ -19,5 +19,5 @@ void pxDpx(double *p, int n, double x, double *px, double *dpx) {
}
}
b
=
p
[
0
]
+
b
*
x
;
b
=
p
[
0
]
+
b
*
x
;
*
px
=
b
;
*
px
=
b
;
*
dpx
=
c
*
dpx
=
c
;
}
}
This diff is collapsed.
Click to expand it.
lista2/Makefile
+
4
−
1
View file @
242164a0
CFLAGS
=
-O2
-std
=
c99
-lm
CFLAGS
=
-O2
-std
=
c99
-lm
all
:
ex1 ex3
all
:
ex1 ex3
ex26
ex1
:
ex1.c
ex1
:
ex1.c
gcc
-o
ex1 ex1.c
$(
CFLAGS
)
gcc
-o
ex1 ex1.c
$(
CFLAGS
)
...
@@ -8,5 +8,8 @@ ex1: ex1.c
...
@@ -8,5 +8,8 @@ ex1: ex1.c
ex3
:
ex3.c
ex3
:
ex3.c
gcc
-o
ex3 ex3.c
$(
CFLAGS
)
gcc
-o
ex3 ex3.c
$(
CFLAGS
)
ex26
:
ex26.c ../libmetodos/libZeroFuncao.c ../libmetodos/libPolinomios.c
gcc
-o
ex26 ex26.c ../libmetodos/libZeroFuncao.c ../libmetodos/libPolinomios.c
$(
CFLAGS
)
clean
:
clean
:
rm
-fr
*
.o
rm
-fr
*
.o
This diff is collapsed.
Click to expand it.
lista2/ex26.c
0 → 100644
+
13
−
0
View file @
242164a0
#include
<stdio.h>
#include
<stdlib.h>
#include
"../libmetodos/libZeroFuncao.h"
int
main
()
{
int
n
=
3
;
double
p
[
4
]
=
{
3.993E-4
,
0
,
-
0
.
165
,
1
},
x
;
x
=
1
;
newtonRaphson
(
p
,
n
,
&
x
,
0
.
0001
);
printf
(
"Zero de função de x³ - 0.165x² + 3.993*10⁻⁴: %.20lf
\n
"
,
x
);
return
0
;
}
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