Здравствуйте, Yozh_Programmer, Вы писали:
Y_P>Почему этот код
Y_P>Y_P>#include <windows.h>
Y_P>#include <stdio.h>
Y_P>#define _USE_MATH_DEFINES
Y_P>#include <math.h>
Y_P>#include <conio.h>
Y_P>const double Log10 = log(10.0);
Y_P>int main()
Y_P>{
Y_P> int x = 100;
Y_P> printf("%.20f\n\n", log((double)x) / Log10);
Y_P> printf("%.20f\n\n", log((double)x) / Log10);
Y_P> while (!kbhit()) {}
Y_P>}
Y_P>
Y_P>выдает такие результаты
Y_P>1.99999999999999980000
Y_P>2.00000000000000000000
У меня он выводит 1.99999999999999980000 в обоих случаях. В чем дело-то?