Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Practice cheby
PROGRAM CHEBYSHEV_METHOD IMPLICIT NONE REAL::F,G,H,TOL INTEGER::N,I REAL, DIMENSION(1000)::X PRINT*,'INPUT THE VALUE OF N:' READ*,N PRINT*,'INPUT THE TOLERANCE:' READ*,TOL X(0)=2.0 N=0 DO WHILE(N<I) X(N+1)=X(N)-(F(X(N))/G(X(N)))-(1/2)*((F(X(N))**2 * H(X(N)))/( G(X(N))**3)) IF (ABS(X(N+1)-X(N))<TOL)THEN PRINT*,'THE REAL ROOT IS:',X(N+1) STOP END IF N=N+1 END DO END PROGRAM CHEBYSHEV_METHOD REAL FUNCTION F(X) IMPLICIT NONE REAL::X F=X**3.0-2.0*X-5.0 END FUNCTION F REAL FUNCTION G(X) IMPLICIT NONE REAL::X G=3.0*X**2.0-2.0 END FUNCTION G REAL FUNCTION H(X) IMPLICIT NONE REAL::X H=6.0*X END FUNCTION H
run
|
edit
|
history
|
help
0
Sum of inverse square series
A
Yegon Japheth tries out Fortran,
my_second_code
A1_Q1_Harsh
Practice 3
SUM OF ODD NUMBERS
A_04 SIMPSON'S RULE (3(I))
Sum of series
Taylors method of three order