/*************************************************************************************************************************************/ /* */ /* I N F L U E N C E D E L A F O R M U L A T I O N I N F O R M A T I Q U E */ /* D E L A D Y N A M I Q U E D E V E R H U L S T : */ /* */ /* */ /* 2 */ /* X = (R+1)X - RX */ /* n+1 n n */ /* */ /* */ /* Author of '$xtc/verhulst$R04$c' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, AAAAMMJJhhmmss). */ /* */ /*************************************************************************************************************************************/ #include <stdio.h> #define PRECIS double \ /* Definition de la precision ('float' ou 'double') des calculs. Le phenomene de la */ \ /* sensibilite a l'ordre des operations ne se manifeste qu'en 'double'... */ #define pas 10 \ /* Pas d'edition des valeurs (dx1,dx2,dx3,dx4,dx5). */ #define N 10 \ /* Nombre d'instants a editer (le nombre d'iterations est donc 'N*pas'). */ #define R 3.0 #define X0 0.5 main() { PRECIS r=R; PRECIS dx1=X0; PRECIS dx2=X0; PRECIS dx3=X0; PRECIS dx4=X0; PRECIS dx5=X0; int n; for (n=0 ; n<(N*pas) ; n++) { if ((n%pas) == 0) { printf("\n iteration(%4d) =",n); printf(" %18.16f",dx1); printf(" %18.16f",dx2); printf(" %18.16f",dx3); printf(" %18.16f",dx4); printf(" %18.16f",dx5); } else { } dx1 = ((r+1)*dx1) - (r*(dx1*dx1)); dx2 = ((r+1)*dx2) - ((r*dx2)*dx2); dx3 = (((r+1) - (r*dx3))*dx3); dx4 = (r*dx4) + ((1 - (r*dx4))*dx4); dx5 = dx5 + (r*((dx5) - (dx5*dx5))); /* Le resultat depend de la syntaxe. Ainsi sur : */ /* */ /* 1-'SYSTEME_DPX5000_SPIX_CC' : */ /* 2-'SYSTEME_NWS3000_NEWSOS_2CC' : */ /* 3-'SYSTEME_SG4D20G_IRIX_CC' : */ /* */ /* iteration( 0) = 0.500000 0.500000 0.500000 0.500000 0.500000 */ /* iteration( 10) = 0.384631 0.384631 0.384631 0.384631 0.384631 */ /* iteration( 20) = 0.418895 0.418895 0.418895 0.418895 0.418895 */ /* iteration( 30) = 0.046399 0.046399 0.046399 0.046399 0.046399 */ /* iteration( 40) = 0.320177 0.320184 0.320192 0.320189 0.320189 */ /* iteration( 50) = 0.067567 0.063747 0.059988 0.061491 0.061503 */ /* iteration( 60) = 0.001145 0.271115 1.000531 1.303880 1.294508 */ /* iteration( 70) = 1.296775 1.328462 1.329692 1.136744 0.141008 */ /* iteration( 80) = 0.553038 0.817163 0.021952 1.310402 0.018439 */ /* iteration( 90) = 0.094852 0.154184 0.048307 0.210684 1.251393 */ /* */ /* */ /* 4-'SYSTEME_ES9000_AIX_CC' : */ /* */ /* iteration( 0) = 0.500000 0.500000 0.500000 0.500000 0.500000 */ /* iteration( 10) = 0.384631 0.384631 0.384631 0.384631 0.384631 */ /* iteration( 20) = 0.418895 0.418895 0.418895 0.418895 0.418895 */ /* iteration( 30) = 0.046399 0.046399 0.046399 0.046399 0.046399 */ /* iteration( 40) = 0.320185 0.320183 0.320188 0.320182 0.320189 */ /* iteration( 50) = 0.063406 0.064521 0.061895 0.064941 0.061244 */ /* iteration( 60) = 1.040381 0.846041 0.529794 1.319900 1.214070 */ /* iteration( 70) = 0.004104 1.199452 0.873553 0.573637 0.000009 */ /* iteration( 80) = 0.108044 0.121414 1.260726 0.395871 0.280590 */ /* iteration( 90) = 0.096374 0.089244 0.582157 0.344503 1.023735 */ /* */ /* */ /* 5-'SYSTEME_RS6000_AIX_CC' : */ /* */ /* iteration( 0) = 0.500000 0.500000 0.500000 0.500000 0.500000 */ /* iteration( 10) = 0.384631 0.384631 0.384631 0.384631 0.384631 */ /* iteration( 20) = 0.418895 0.418895 0.418895 0.418895 0.418895 */ /* iteration( 30) = 0.046399 0.046399 0.046399 0.046399 0.046399 */ /* iteration( 40) = 0.320177 0.320184 0.320188 0.320190 0.320189 */ /* iteration( 50) = 0.067567 0.063747 0.061859 0.060822 0.061486 */ /* iteration( 60) = 0.001145 0.271115 0.616781 0.298613 1.307350 */ /* iteration( 70) = 1.296775 1.328462 0.486629 0.938605 1.054669 */ /* iteration( 80) = 0.553038 0.817163 1.277151 1.325437 0.617058 */ /* iteration( 90) = 0.094852 0.154184 1.174162 0.148151 0.237355 */ /* */ } printf("\n"); }