Is there an explicit formula to obtain the numerator and/or denominator of a rational number?
I'm looking for two functions Q -> Z such that gcd(num(x), den(x)) = 1 and num(x)/den(x) = x. So, num(0.5) = 1, and den(0.5) = 2. I assume it will be an infinite series, but can't find anything online because it all just brings up elementary "what is a fraction" articles.
Edit: Here is the solution: https://www.reddit.com/r/learnmath/s/nkH0H0eaBv