/************************************************************************/
/*                                                                      */
/*         Code generated by FED-CASE V1.0  Code Generator              */
/*                  © Joosen Software Development                       */
/*                    All rights reserved 1993                          */
/*                                                                      */
/************************************************************************/

/************************************************************************/
/*                                                                      */
/*                          Start of Includes                           */
/*                                                                      */
/************************************************************************/

#include <exec/types.h>
#include <data/const_chaos.h>
#include <stdio.h>
#include <stdlib.h>

/************************************************************************/
/*                                                                      */
/*                           End of Includes                            */
/*                                                                      */
/************************************************************************/

/************************************************************************/
/*                                                                      */
/*                    Start of source prototype file                    */
/*                                                                      */
/************************************************************************/

#include <proto/proto_chaos.h>

/************************************************************************/
/*                                                                      */
/*                     End of source prototype file                     */
/*                                                                      */
/************************************************************************/


/************************************************************************/
/* Procedure  : void V_chaos(FF_X,FF_k)                                 */
/* Function   :                                                         */
/* Designer   : C.Joosen & R.Heijmans                                   */
/* Date       : Sat Nov 27 13:40:15 1993                                */
/*                                                                      */
/* Modificat  :                                                         */
/* Handler    :                                                         */
/* Modific.   :                                                         */
/*                                                                      */
/************************************************************************/

void V_chaos(FF_X,FF_k)
float FF_X;
float FF_k;
{
float LF_Xold;
float LF_Xnew;
int LI_count;
float LF_eps;

	LF_eps= 0.00001 ;
	LI_count= 0;
	do
	{
		LF_Xnew= FF_k* FF_X* ((float)1 - FF_X);
		LF_Xold= FF_X;
		FF_X= LF_Xnew;
		LI_count++;
	} while( abs((int) LF_Xnew - (int)LF_Xold ) > LF_eps);	/* abs:  */
	printf( "%d iteraties\n" , LI_count );			/* printf: Standard output function */
}								/* end of V_chaos */

/************************************************************************/
/* Procedure  : void main()                                             */
/* Function   :                                                         */
/* Designer   : C.Joosen & R.Heijmans                                   */
/* Date       : Sat Nov 27 13:40:19 1993                                */
/*                                                                      */
/* Modificat  :                                                         */
/* Handler    :                                                         */
/* Modific.   :                                                         */
/*                                                                      */
/************************************************************************/

void main()
{

	V_chaos( (float) 22 , (float) 115 );
}								/* end of V_main */
