C 2BUNHOU DE HOUTEISHIKI WO TOKU

	PROGRAM BISECTION
	REAL A, B, C
	REAL EPS

	EPS=1E-5


C ---- SHOKICHI NYURYOKU  ----------------------------
 	
1	WRITE(6,*)
	WRITE(6,*) 'A= ??'
	READ(5,*) A
	WRITE(6,*) 'B= ??'
	READ(5,*) B

	IF(FUN(A)*FUN(B).GE.0)THEN
	  WRITE(6,*)'BAD INITIAL VALUE F(A)*F(B) >0 !!!'
	  GO TO 1
	ENDIF


C ---  SHOKICHI NO OKISA HANTEI ----------------------

	IF(B-A.LT.0)THEN
	  C=A
	  A=B
	  B=C
	ENDIF


C --- KAI NO KEISAN TO HYOJI ------------------------	

2	IF(B-A.LT.EPS)THEN
	  WRITE(6,*)' KAI WA  X = ',C
	  STOP
	ENDIF

	C=(A+B)/2

	IF(FUN(C)*FUN(A).LT.0)THEN
	    B=C
	  ELSE
	    A=C
	ENDIF

	GO TO 2

	END

C====================================================
C   TOKUBEKI HOUTEISHIKI NO KANSU
C====================================================
	REAL FUNCTION FUN(X)
	REAL X
	
	FUN=X**3/2-2*X**2-X-4

	RETURN
	END