Question: Try to use h = 1 0 - 1 6 to approxmate the derivative. Display the value, and write a comment about what is happening.

Try to use h=10-16 to approxmate the derivative. Display the value, and write a comment about what is happening. Why do you think this happened?
def f(x):
y=x**2
return y
x=2
h=1e-16
deriv=(f(x+h)-f(x))/h
print("x =", x,"h =",h,"derivative =",deriv)
x =2 h =1e-16 derivative =0.0
Try to use h = 1 0 - 1 6 to approxmate the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!