How can I express a decimal such as 0.1845095405274387 as a fraction in its lowest terms?
Asked
Active
Viewed 1.2k times
15
3 Answers
8
Still another possibility:
Last[Convergents[0.1845095405274387]]
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
-
1
-
I deal with continued fractions somewhat frequently, you see... – J. M.'s missing motivation Jun 22 '12 at 02:04
7
A couple of bits of code for your consideration:
FromDigits@#/10^(Length@# - #2) & @@ RealDigits[0.1845095405274387]
Rationalize[0.1845095405274387, $MachineEpsilon]
Mr.Wizard
- 271,378
- 34
- 587
- 1,371
Rationalize[0.1845095405274387, 10^-50]? – Dr. belisarius Jun 20 '12 at 01:07