First of all, the description says: N.B: we define the GCD of $a/b$ and $c/d$ to be gcd$(ad, bc)/bd$, reduced to lowest terms.
While the implementation does essentially $gcd(a,c) / lcm(b,d)$ with lcm being computed like $lcm(d1, d2) = (d1/gcd(d1,d2)) * d2$.
This only works if the fractions are already reduced. For example:
julia> S, x = polynomial_ring(QQ, "x");
julia> F = fraction_field(S);
julia> gcd( F((x+1)*(x+2), (x+2)^2), F((x+1)^3, (x+1)*(x+2)) )
(x + 1)//(x^3 + 5*x^2 + 8*x + 4)
julia> gcd( (x+1)*(x+2) // (x+2)^2 , (x+1)^3 // ((x+1)*(x+2)) )
(x + 1)//(x + 2)
EDIT: note that the algorithm described in the comment would work
First of all, the description says:
N.B: we define the GCD of $a/b$ and $c/d$ to be gcd$(ad, bc)/bd$, reduced to lowest terms.While the implementation does essentially$gcd(a,c) / lcm(b,d)$ with lcm being computed like $lcm(d1, d2) = (d1/gcd(d1,d2)) * d2$ .
This only works if the fractions are already reduced. For example:
EDIT: note that the algorithm described in the comment would work