История изменений
Исправление
geekless,
(текущая версия)
:
В итоге имеем поведение, которое противоречит стандарту, т.е. баг компилятора.
А теперь открываем стандарт и читаем:
The accuracy of the floating-point operations (+, -, *, /) and of the library functions in <math.h> and <complex.h> that return floating-point results is implementation-defined, as is the accuracy of the conversion between floating-point internal representations and string representations performed by the library functions in <stdio.h>, <stdlib.h>, and <wchar.h>. The implementation may state that the accuracy is unknown.
Так что ты стопроцентно прав:
стандарт знать обязательно всегда.
Вот ты, например, не знаешь.
Исходная версия
geekless,
:
В итоге имеем поведение, которое противоречит стандарту, т.е. баг компилятора.
А теперь открываем стандарт и читаем:
The accuracy of the floating-point operations (+, -, *, /) and of the library functions in <math.h> and <complex.h> that return floating-point results is implementation-defined, as is the accuracy of the conversion between floating-point internal representations and string representations performed by the library functions in <stdio.h>, <stdlib.h>, and <wchar.h>. The implementation may state that the accuracy is unknown.
Так что ты стопроцентро прав:
стандарт знать обязательно всегда.
Вот ты, например, не знаешь.