Recent content by mrous27

  1. M

    Comp Sci How can I calculate pi in Fortran without using intrinsic functions?

    Thakns,It is forbidden to use sin(x) and cos(x). We have to use these infinite series to describe sin(x) and cos(x) to Fortran.
  2. M

    Comp Sci How can I calculate pi in Fortran without using intrinsic functions?

    My attempt ; PROGRAM ASD IMPLICIT NONE REAL::SINX,x,cosx,z INTEGER::I,N=9000 DO i = 1,n x=0.5 n=1 sinx=0. sinx=sinx+z n=n+1 z=z+(-1)**n*x**(2*n+1)/((2*n-2)*(2*n-1)) print*, sinx END DO DO i = 1,n x=0.5 n=1 cosx=0...
  3. M

    Comp Sci How can I calculate pi in Fortran without using intrinsic functions?

    Homework Statement I have a project about pi. We are wanted to calculate pi in Fortran 90/95,without use intrinsic functions. For example, we must think like a computer. Homework Equations We must use formula of sin(x) and cos(x) for find 'pi'. When Sin(x)=cos(x) (and error is 10**-4)...
Back
Top