Skip to content
This repository was archived by the owner on Aug 17, 2018. It is now read-only.

Commit af4a786

Browse files
authored
changing value of incremental change
1 parent d3d43f1 commit af4a786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

precourse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import numpy as np
1313

1414
def derivative(func , x):
15-
h = np.finfo(np.float).eps
16-
return round((func(x+h)-func(x))/h,3)
15+
i = 0.0000000001
16+
return round((func(x+i)-func(x))/i,3)
1717

1818
def f(x):
1919
return x**2

0 commit comments

Comments
 (0)