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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started