C 2BUNHOU DE HOUTEISHIKI WO TOKU

	PROGRAM BISECTION
	REAL A, B, C
	REAL FA, FB, FC
	REAL EPS

	EPS=1E-6


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

	FA=A**3/2-2*A**2-A-4
	FB=B**3/2-2*B**2-B-4

	IF(FA*FB.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
	
	FA=A**3/2-2*A**2-A-4
	FC=C**3/2-2*C**2-C-4

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

	GO TO 2

	END