Question: 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 arctan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
