Intuitively I would think that long doubles have more decimal places than doubles and doubles have more decimal places than floats, however, if so why does std::cout print out floats, doubles, and long doubles at the same decimal precision, even when they have overloads for all primitive data types?
C++ source code:
#include <iostream>
#define PI 3.1415926535897932384626433832;
int main()
{
float f = PI;
double d = PI;
long double ld = PI;
std::cout << f << std::endl;
std::cout << d << std::endl;
std::cout << ld << std::endl;
return 0;
}
output:
3.14159
3.14159
3.14159