If you compile you get two warnings, because the single "f" in "printf" wants a double, but in two cases you've got a "long double".
So you get an overflow.
You should take "Lf" instead of "f" in this cases.
A warning always shows that something unexpected might happen, even if the code compiles without errors.