Does anyone know how to find out the precision of long double on a specific platform? I appear to be losing precision after 17 decimal digits, which is the sa
long double
You can find out with std::numeric_limits:
std::numeric_limits
#include <iostream> // std::cout #include <limits> // std::numeric_limits int main(){ std::cout << std::numeric_limits<long double>::digits10 << std::endl; }
You can use <cfloat>. Specifically:
LDBL_DIG