In C++ (and C), a floating point literal without suffix defaults to double, while the suffix f implies a float. But what is the suffix to get a long double?
Without knowing, I would define, say,
const long double x = 3.14159265358979323846264338328;
But my worry is that the variable x contains fewer significant bits of 3.14159265358979323846264338328 than 64, because this is a double literal. Is this worry justified?
#include <float.h> LDBL_MAXand you see1.18973149535723176502e+4932Lwhich answers your question. - Marc Glisselong doubleconstant... (suffix L) - Marc Glisse