If you are using a mingW C compiler and in windows this happens because of the way in the printf interprets the long double as double.
you can fix this by using __mingw_printf() instead of printf() :)
For reference https://stackoverflow.com/a/14988103/25043047 .