#include <iostream>
template<typename To, typename From>
union Reinterpret_Cast
{
Reinterpret_Cast(From f) : f(f)
{
}
operator To()
{
return t;
}
private:
From f;
To t;
};
int main()
{
double d = 0.1;
unsigned long long n = Reinterpret_Cast<unsigned long long, double>(d);
std::cout << n << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8dHlwZW5hbWUgVG8sIHR5cGVuYW1lIEZyb20+CnVuaW9uIFJlaW50ZXJwcmV0X0Nhc3QKewogICAgUmVpbnRlcnByZXRfQ2FzdChGcm9tIGYpIDogZihmKQogICAgewogICAgfQogICAgb3BlcmF0b3IgVG8oKQogICAgewogICAgICAgIHJldHVybiB0OwogICAgfQpwcml2YXRlOgogICAgRnJvbSBmOwogICAgVG8gdDsKfTsKCmludCBtYWluKCkKewogICAgZG91YmxlIGQgPSAwLjE7CiAgICB1bnNpZ25lZCBsb25nIGxvbmcgbiA9IFJlaW50ZXJwcmV0X0Nhc3Q8dW5zaWduZWQgbG9uZyBsb25nLCBkb3VibGU+KGQpOwogICAgc3RkOjpjb3V0IDw8IG4gPDwgc3RkOjplbmRsOwp9