implicit real*8 (a-h,o-z) F(X)=EXP(-X)-X OPEN(5,FILE='biseccion.dat') OPEN(6,FILE='biseccion.out') READ(5,*)XL,XU,ES,IM 1 FORMAT(3F10.0,I5) AA=F(XL)*F(XU) IF(AA.GE.0.0) GOTO 310 XR=(XL+XU)/2 DO 240 NI=2,IM AA=F(XL)*F(XR) IF (ABS(AA).EQ.0.01) GOTO 300 IF (AA.LT.0.0)XU=XR IF (AA.GT.0.0)XL=XR XN=(XL+XU)/2 IF (XN.EQ.0.0) GOTO 230 EA=ABS((XN-XR)/XN)*100 IF (EA.LT.ES) GOTO 280 230 XR=XN 240 CONTINUE WRITE(6,2) 2 FORMAT(' ','NO SE ENCONTRO LA RAIZ') WRITE(6,3)XR,EA 3 FORMAT(' ',2F10.5) GOTO 310 280 WRITE(6,4)XN,EA,NI 4 FORMAT(' ',2F10.5,I5) GOTO 310 300 WRITE(6,5)XR 5 FORMAT(' ','LA RAIZ EXACTA ES =',F10.5) 310 STOP END