float result for two smallest integer division I want to know the two integer number that division of them is this float. for example 
x / y = 1.333333333....

$x$ and $y$ can be 8, 6 and 4, 3 ... i need x = 4 and y = 3.
For next example my number is 1.41 what are x and y? how can i find them ?
 A: What you're looking for is the irreducible fraction. I will quote from the Wiki page:

A fraction that is reducible can be reduced by dividing both the numerator and denominator by a common factor. It can be fully reduced to lowest terms if both are divided by their greatest common divisor. In order to find the greatest common divisor, the Euclidean algorithm may be used. Using the Euclidean algorithm is a simple method that can even be performed without a calculator.

So you need to divide out both $x,y$ by the greatest common divisor (GCD) of $(x,y).$ There is a simple fast algorithm for computing GCD: Euclidean algorithm.
For example, if $x = 8$ and $y = 6,$ then compute $d = \gcd(8, 6) = 2,$ and the reduced pair is then $x/d = 4, y/d = 3.$
For $1.41,$ start with $x = 141, y = 100.$ Since $\gcd(141, 100) = 1,$ the fraction $x/y$ is in reduced form already.

As gt6989b pointed out, my answer above assumes you have $x$ and $y.$ A better approximation is via continued fractions. See here and here.
A: To make this cover all possible cases, to convert a decimal into a fraction, you must have an infinitely repeating decimal pattern starting after some digit (e.g. 1.23454545... will work but $\pi$ will not because it's decimal pattern does not infinitely repeat).
If your repeating pattern is 0, e.g. 1.41=1.4100.., use Mariano Suárez-Alvarez's idea in the comments to your question - take all digits without decimal point as the first integer (i.e. 141 here) and take $10^n$ where $n$ is the number of digits after the decimal point as the second integer (here $10^2=100$ and use J.D.'s answer with the GCD to simplify the fraction (in our example, $141/100$ does not simplify).
If your pattern is not 0 (e.g. 1.2345[45] as above), then break the fraction into 2 parts, isolating the repeating pattern, and scale it by the right power of 10 to make it start at the first decimal point, i.e.
$1.23[45] = 1.23 + 0.45[45]/100.$
In that form, the infinitely repeating decimal can be written as a fraction where the top is the repeating pattern (here 45) and the bottom is the number of 9's equal to the digits in the pattern (here 2 digits, so 99). So 0.45[45] = 45/99 and overall you get [transforming the first part using the previously-given algorithm]:
$1.23[45] = \frac{123}{100} + \frac{45}{99 \cdot 100}$,
and now add fractions appropriately and use GCD algorithm below to simplify common fractions.
A: Given a real number, $r>0$, for any positive integer $N$, a simple pigeon hole argument shows that $r$ can be approximated by a rational $p/q$ so that $q>N$ and
$$
\left|\;\frac{p}{q}-r\;\right|<\frac1{q^2}
$$
Continued Fractions will always give such an approximation.
Furthermore, if $r\not\in\mathbb{Q}$ and the approximation is such that
$$
\left|\;\frac{p}{q}-r\;\right|<\frac1{2q^2}
$$
then $p/q$ is arrived at using Continued Fractions.
