/*************************************************************************************************************************************/
/* */
/* P R O B L E M E D ' I N T E R P O L A T I O N : */
/* */
/* */
/* Author of '$xtc/interpole.11$c' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 20080710120256). */
/* */
/*************************************************************************************************************************************/
#include <stdio.h>
#include "INCLUDES.01.I"
#define N0 \
1
#define N \
90
/* Nombre d'interpolations. */
#define V1_D \
253
#define V1_A \
164
/* Definition de la premiere serie. */
#define V2_D \
100
#define V2_A \
126
/* Definition de la deuxieme serie. */
#define INTERPOLE(VD,VA) \
(int)(VD+((VA-VD)*((double)(n-N0)/(double)(N-N0))))
/* Fonction d'nterpolation. */
main()
{
int n;
for (n=N0 ; n <= N ; n++)
{
int V1=INTERPOLE(V1_D,V1_A);
int V2=INTERPOLE(V2_D,V2_A);
/* Interpolation des deux series... */
double produit;
produit=((double)(V1*V2))/((double)BLANC);
printf("(%dx%d)/%d = %f (par defaut=%d, par exces=%d)\n",V1,V2,BLANC,produit,(int)produit,(int)(produit+0.5));
}
}