#include <iostream>
#include <iomanip>
#include <limits>
#include <cstdint>
using std::cout;

int main()
{
	typedef std::uint_fast64_t uint_type;

	double a, b, c;
	uint_type ta, tb, tc, ic;

	a = 45'035'996'273'704'952ULL; // (2**53 - 2) * 5 + 2;
	b = 9'007'199'254'740'991ULL;     //  2**53 - 1;
	c = a / b;

	ta = static_cast<uint_type>(a);
	tb = static_cast<uint_type>(b);
	tc = static_cast<uint_type>(c);
	ic = ta / tb;

	cout << std::setprecision(std::numeric_limits<double>::max_digits10) << std::scientific << std::boolalpha;

	cout << "a  == "  << a  << "\n";
	cout << "ta ==  " << ta << "\n\n";
	
	cout << "b  == "  << b  << "\n";
	cout << "tb ==  " << tb << "\n\n";

	cout << "c  = "   << c  << "\n";
	cout << "tc ==  " << tc << "\n";
	cout << "ic ==  " << ic << "\n";

	cout << "tc == ic: " << (tc == ic) << "\n\n";
	
	return 0;
}