main()
{
double A,B,x0,x1,x2,x3,x4,x5,x6,x7;
/* Utilisation de la "double précision" représentant les */
/* nombres flottants sur 64 bits. */
B = 4095.1;
A = B+1;
/* A-B = 1 à epsilon près (à un bit près) !!! En effet : */
/* 4095.1 = 4095 + 1/10, or en base 2 : */
/* 1/10 = 0.0 0011 0011 0011 0011 0011 0011 0011 0011 0011 ... */
/* ad infinitum ! */
x0 = 1; printf("x0 = %+.16f\n",x0);
/* x0=1 */
x1 = (A*x0) - B; printf("x1 = %+.16f\n",x0);
/* on a : x1 = (A*x0)-B = (A*1)-B = A-B = 1 */
x2 = (A*x1) - B; printf("x2 = %+.16f\n",x1);
x3 = (A*x2) - B; printf("x3 = %+.16f\n",x2);
x4 = (A*x3) - B; printf("x4 = %+.16f\n",x3);
x5 = (A*x4) - B; printf("x5 = %+.16f\n",x5);
x6 = (A*x5) - B; printf("x6 = %+.16f\n",x6);
x7 = (A*x6) - B; printf("x7 = %+.16f\n",x7);
/* et de même : x7 = x6 = x5 = x4 = x3 = x2 = x1 = x0 = 1 */
}
x0 = +1.0000000000000000
x1 = +1.0000000000004547
x2 = +1.0000000018630999
x3 = +1.0000076314440776
x4 = +1.0312591580864137
x5 = +129.0406374377594148
x6 = +524468.2550088063580915
x7 = +2148270324.2415719032287598
JFC
www.lactamme.polytechnique.fr