Question: from time import ctime from math import sinh print(' ' + '-'*80) TOLERANCE = 1.0e-17 x = float(input(Enter an angle in x: )) TOLERANCE =float(input(Enter

from time import ctime

from math import sinh

print(' ' + '-'*80)

TOLERANCE = 1.0e-17

x = float(input("Enter an angle in x: "))

TOLERANCE =float(input("Enter The Tolerance :"))

factor = 2 sine = 0.0 term = x xSquared = x * x count = 0 while abs(term) > TOLERANCE:

sine += term

term = term * xSquared / (factor * (factor + 1))

count += 1

factor += 2

error = sinh(x)/sine

print(""" Python's value of sinh(%r) :%2.14e The approximate value of sinh(%r) is :%2.14e The error in the approximation is : %2.6e The number of terms in the seris is :%d""" % (x,sinh(x),x,sine,error,count) )

I can't find out the approximation error..

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 Databases Questions!