67.035 μs (939 allocations: 59.97 KiB)
+@btime gcd(gcd($f, $g), $h)
70.602 μs (939 allocations: 59.97 KiB)
3 + x
With Groebner.jl:
F = [f, g, h]
-@btime groebner($F)
151.353 μs (1873 allocations: 142.22 KiB)
+@btime groebner($F)
163.326 μs (1875 allocations: 142.31 KiB)
1-element Vector{DynamicPolynomials.Polynomial{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, MultivariatePolynomials.Graded{MultivariatePolynomials.LexOrder}, Rational{BigInt}}}:
3//1 + x