Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i dont understand Fotran, please help ! Exercise 5 program arctan This program is calculates mplicit none arctan integer:: n real(8) :: x, ans Modify(Debug)
i dont understand Fotran, please help !
Exercise 5 program arctan This program is calculates mplicit none arctan integer:: n real(8) :: x, ans Modify(Debug) the progr m to always output the correct ans - myatan(n, x) result. n=15 x 0.5d0 write(,(A,F3.1,A,F15.10) 'atan(,x,')-',atan(x) write(,(A,F15.10)') 'Maclaurin-s expansion ',ans stop Correct result: atan(0.5)0.4636476090 Maclaurin-s expansion0.4636476090 contains function myatan(n, x) result(ans) integer, intent(in):: n real(8), intent(in):: >x integer:: i real:: ans doi-1, n -1)-12-1 ans ans+ (-1)**(i 1)) (2*i - 1) * (x**(2*i 1)) end do end function myatan end program arctanStep 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