7. In your Calculus course, you will see that an approximate formula for √1+r is: 5 4 √1+x=1+ 1 #include #incl

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

7. In your Calculus course, you will see that an approximate formula for √1+r is: 5 4 √1+x=1+ 1 #include #incl

Post by answerhappygod »

7 In Your Calculus Course You Will See That An Approximate Formula For 1 R Is 5 4 1 X 1 1 Include Stdio H Incl 1
7 In Your Calculus Course You Will See That An Approximate Formula For 1 R Is 5 4 1 X 1 1 Include Stdio H Incl 1 (38.65 KiB) Viewed 25 times
USING C LANGUAGE ONLY!
7. In your Calculus course, you will see that an approximate formula for √1+r is: 5 4 √1+x=1+ 1 #include <stdio.h> #include <math.h> - Your program input/output should look like: Enter x 0.5 x=0.500000 approximate value = 1.224121 actual value = 1.224745 percent relative error = 0.050935% int main(void) { This formula will give a reasonable approximation provided | < 1. The approximiation improves as r gets smaller. 1 Write a program, approx.c to test the accuracy of this formula for various values of r. In your program make sure that you write the fractions as, for example, 5.0/128.0 rather than 5/128. Your program should compute the percent relative error: /* you fill in here / return 0; relative error in % = approximate value - actual value actual value + 16 128 For marking purposes, run your program for z = 0.5 and also for x = 0.99. /* File approx.c Approximate the function sqrt(1+x) Programmer: Date: x 100
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply