I ran into this when I was trying to use long double for simple calculations and output and so I am trying to find out what is wrong. I don't understand where this behaviour comes from. It appears to be a problem with cout displaying long double variables. Is it the compiler ?
I am using the Dev-C++ 5.2.0.3 package which I think uses some version of MinGW 4.6, including C++11 support.
but 1.13259e-317 is such a ridiculously small number compared to 60.00
i'm thinking that it could be your code rather than the compiler (it's like an unitialised variable)
Thank you for your replies! I am using Dev-C because I was looking for C++11 support and wanted to avoid Visual Studio and its .Net framework (I suspect having it installed is crashing my system).
Dev-C++ is a recent revival of the 2005 name. I couldn't set up MinGW with another IDE while Dev-C++ came packaged.
It appears that converting a long double variable or constant literal into double before displaying it with cout makes things work. Behind it, operations like adding, multiplying, etc., seem to go normally for long doubles.