Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-24fa
minimathematica
Commits
a0b3acfd
Commit
a0b3acfd
authored
6 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
fix func -> func_name for clarity
parent
5f83d117
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/taylor.py
+4
-4
src/taylor.py
with
4 additions
and
4 deletions
+4
-4
src/taylor.py
View file @
a0b3acfd
...
...
@@ -13,7 +13,7 @@ def nth_derivative(func, n):
return
None
@
cache
def
taylor
(
func
,
x
,
N
):
def
taylor
(
func
_name
,
x
,
N
):
"""
Returns the taylor expansion of func as a function of x, centered at 'b'.
Since the 0th term is just the function itself (which we don't have the answer for yet),
...
...
@@ -23,13 +23,13 @@ def taylor(func, x, N):
"""
return
None
def
taylor_at
(
func
,
b
,
f_at_b
,
N
):
def
taylor_at
(
func
_name
,
b
,
f_at_b
,
N
):
"""
Returns taylor(-), evaluated by plugging in f_at_b for 'q' and b for 'b'.
"""
return
None
def
max_error
(
func
,
a
,
x
,
n
):
def
max_error
(
func
_name
,
a
,
x
,
n
):
"""
Calculates the maximum error of the estimate below using Taylor's Theorem
in the following way.
...
...
@@ -53,7 +53,7 @@ def max_error(func, a, x, n):
return
None
@
cache
def
estimate
(
func
,
x
,
a
,
func_at_a
,
N
):
def
estimate
(
func
_name
,
x
,
a
,
func_at_a
,
N
):
"""
Uses the taylor expansion centered around a to compute an estimate for func(x).
"""
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help