The Python programming language has a float.as_integer_ratio(x) function which exactly converts an IEEE 754 floating-point number into a numerator/denominator pair of integers. For example:
float.as_integer_ratio(0.1)
=> (3602879701896397, 36028797018963968)
What is the Mathematica equivalent of this function for MachinePrecision numbers?
SetAccuracyappears to be equivalent. (+1) – Mr.Wizard May 24 '15 at 10:13