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


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

#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       : Fri Mar 10 21:08:07 1995                                */
/*                                                                      */
/* Modificat  :                                                         */
/* Handler    :                                                         */
/* Modific.   :                                                         */
/*                                                                      */
/************************************************************************/

void V_chaos(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 * ( 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:  */
}                                                          /* end of V_chaos */

/************************************************************************/
/* Procedure  : void main()                                             */
/* Function   :                                                         */
/* Designer   : C.Joosen & R.Heijmans                                   */
/* Date       : Fri Mar 10 21:08:08 1995                                */
/*                                                                      */
/* Modificat  :                                                         */
/* Handler    :                                                         */
/* Modific.   :                                                         */
/*                                                                      */
/************************************************************************/

void main()
{

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