Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
pattaraporn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pattaraporn
pattaraporn
Commits
90fbfa7f
Commit
90fbfa7f
authored
May 24, 2018
by
pattaraporn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aa
parent
39c02e8e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
opt.py
opt/opt.py
+12
-0
No files found.
opt/opt.py
0 → 100644
View file @
90fbfa7f
def
f
(
x
):
return
x
**
2
-
2
*
x
+
1
def
bracket7
(
f
,
a
=-
2
,
b
=
2
,
h
=
0.01
):
xi
=
a
oldf
=
f
(
xi
)
xi
+=
h
newf
=
f
(
xi
)
while
newf
<
oldf
newf
=
oldf
x
+=
h
newf
=
f
(
xi
)
xi
=
h
print
(
xi
)
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