Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

icri .cm COMP 1012-Computer Programming for Scientists and Engineers The purpose of this question is to write a Python program that computes the approximate value

image text in transcribed
icri .cm COMP 1012-Computer Programming for Scientists and Engineers The purpose of this question is to write a Python program that computes the approximate value of log.(x), wherex>0, using the series in the equation given below log,(x)-21x-11-1 Add terms to the sum of the series as long as the absolute value of the current term is greater than the given tolerance. Yupramut nputehelerane ts Compute the value of log.(x) using Python's log function. This value and the sum of the series are to be displayed to 14 decimal places using exponential format. Compute the absolute value of the difference between the value of the sum of the series and the value from Python's log function. This value must be displayed to 6 decimal places using exponential format and is referred to as the error in the approximation. For a tolerance of 10-17 and x following: 12.55 the output from the program must be similar to the Enter the value of the tolerance: 1le-17 Enter the value of x (x > 0): 12.55 The approximate value of loge (12.550000) is 2.52972066557779e+00 Python's value of loge (12.550000) is 2.52972066557779e+00 The difference of the values is 1.332268e-15 Programmed by Stew Dent. Date: Fri Sep 14 10:35:38 2018 End of processing. Test your program for different values of x and different tolerances. Hand in your program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books