Transforms a double to a fraction and simplifies the result.
double to transform
pointer to a int to hold the result numerator
pointer to a int to hold the result denominator