#include <iostream>
#include <limits>
#include <iomanip>
template <typename T>
unsigned get_max_precision()
{
return std::numeric_limits<T>::max_digits10 + 1;
}
int main()
{
float a = 0.7;
double b = 0.7;
std::cout << std::setprecision(get_max_precision<double>());
std::cout << "a is " << a << "\nb is " << b << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGltaXRzPgojaW5jbHVkZSA8aW9tYW5pcD4KCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgp1bnNpZ25lZCBnZXRfbWF4X3ByZWNpc2lvbigpCnsKICAgIHJldHVybiBzdGQ6Om51bWVyaWNfbGltaXRzPFQ+OjptYXhfZGlnaXRzMTAgKyAxOwp9CgppbnQgbWFpbigpCnsKICAgIGZsb2F0ICAgYSA9IDAuNzsKICAgIGRvdWJsZSAgYiA9IDAuNzsKCiAgICBzdGQ6OmNvdXQgPDwgc3RkOjpzZXRwcmVjaXNpb24oZ2V0X21heF9wcmVjaXNpb248ZG91YmxlPigpKTsKICAgIHN0ZDo6Y291dCA8PCAiYSBpcyAiIDw8IGEgPDwgIlxuYiBpcyAiIDw8IGIgPDwgJ1xuJzsKfQ==