Write a C Program and algorithm

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a C Program and algorithm

Post by answerhappygod »

Write a C Program and algorithm
Write A C Program And Algorithm 1
Write A C Program And Algorithm 1 (72.73 KiB) Viewed 33 times
Topic 2 Write a program that uses the Taylor series to solve the In(x) function using the formula below. Next, use the In(x) function that was created to determine log100), In(), and custom log() for positive real numbers of x. Output the solution as a step-by-step output to the screen. 1x106 2k+1 In(x) = 2 X zk+16+ 1 467) k=0 The formula will calculate In(x) for any real number x > 0. The program must fulfil these requirements: • All real numbers used must be double variable type. • The maximum number of iteration for the formula is set at 1e6. • Calculation must stop when the result is within 1e-7 of the actual value. • Functions log100) and log() in math.h ARE NOT allowed to be used! Examples: Choose [1] log10(x), [2] in(x), [3] custom log(x): 1 Enter value of x: 342042 log10( 342042.000000) log10( 100000.000000 ) + log10( 3.420420 ) = 4.998213 + 0.534079 = 5.532293 Choose [1] log10(x), [2] in(x), [3] custom log(x): 2 Enter value of x: 217 in( 217.000000) in( 100.000000 ) + In( 2. 170000) 4.605166 + 0.774727 = 5.379893 Choose [1] log10(x), [2] in(x), [3] custom log(x): 3 Enter value of x: 7895 Enter custom log base: 7 log7( 7895.000000 ) log 7( 1000.000000 ) + log7 7.895000) = 3.549861 + 1.061832 = 4.611693
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply