/*----------------------------------------------------------
エノン写像のリアプノフスペクトラムの計算
calculating the Lyapunov spectrum of the Henon map
x[t+1] = 1.0 - A * x[t] * x[t] + y[t]
y[t+1] = B * x[t]
henon_lyap.h
----------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define ITERATION 100000
#define SKIP 10000
// parameters
#define A 1.4
#define B 0.3
/* Periodic: 0.40 < a < 1.05 */
/* Chaotic: 1.10 < a < 1.42 */
// 初期値
// initial values
#define X0 0.631
#define Y0 0.189
// 変数の数
// number of variables
#define DIM 2
/*------------------------------------------------------------------------*/
extern void henon_eqs( double (*x), double (*y), double u[DIM][DIM] );
extern void gram_schmidt_orth( double u[DIM][DIM], double e[DIM][DIM] );
extern double calc_lyap_dim( double lambda[DIM] );
extern double log2( double x );