let suppose that we have a floating-point number; (always greater than 0 and less than 1); (0 < x < 1) how could I get two numbers which division of those produce a number exactly or near two the float number;
for example: if we have x = 0.4; I want to have an algorithm to find a/b (a and b are integers) which in this case are 2/5;
and suppose 6 digits similarity is sufficient;so (if y: 0.56423348256; a/b = 0.564233778888) it is okay
thanks in advance for any idea, help, name of any methods that could help