When I run
Rationalize[2.98688387095, 0]
I get $\frac{117300079}{39271724}$
However, when I run
N[117300079/39271724, 50]
I get
2.986883870949999546747680341204272060987
But what I really wanted was
2.986883870950000000000000000000000000000
How can I find the exact rational form of 2.98688387095?
FromDigits @ RealDigits @ 2.98688387095. – Carl Woll Apr 13 '18 at 01:43Rationalize[num, 0]doesn't give an exact rational conversion. You instead needRationalize[num\z,0], where (simplifying from my answer) z>= twice the number of digits in the number. So, for your case, using a z of 100 (far more than enough), we have:x = Rationalize[2.98688387095`100, 0]andN[x, 50] = 2.9868838709500000000....` – theorist Apr 13 '18 at 07:01