Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_01 FIXED_POINT_IM(I)
PROGRAM FIXED_POINT_IM IMPLICIT NONE REAL::F,X,G,X0,X1,TOL INTEGER::I,N PRINT*,"ENTER THE INITIAL VALUE :" READ*,X0 PRINT*,"ENTER THE VALUE OF N:" READ*,N PRINT*,"ENTER THE VALUE OF TOL:" READ*,TOL PRINT*,X0 DO 10 I = 1,N X1 = G(X0); PRINT*,X1 IF(F(X1)==0) THEN PRINT*, "THE SOLUTION IS :",X1 STOP END IF IF(ABS(X0-X1)<TOL) THEN PRINT*,"THE REAL ROOT IS:",X1 PRINT*,'THE FORM CONVERGES' STOP END IF X0 = X1 10 CONTINUE PRINT*,"TH FORM DOESN'T CONVERGE" END PROGRAM FIXED_POINT_IM REAL FUNCTION F(X) REAL::X F = X**3.0- 2.0*X -5.0 RETURN END FUNCTION REAL FUNCTION G(X) REAL::X G = (X**3.0-5.0)/2.0 RETURN END FUNCTION
run
|
edit
|
history
|
help
0
A_01 NEWTON_R_M(B(I))
Subroutine problem
test for linear congruential method
Y
Title
Practice 2(I)
LU gauss
Gauss forward elimination
Fixed point for several variables
We subroutine