Two Julia methods, f(x::Integer, y::Number) and f(x::Number, y::Integer). Each runs a different algorithm, chosen for whichever argument is the integer. f(2, 3.0) lands on the first and f(2.0, 3) on the second. No trouble so far.
Now turn that float into an integer. f(2, 3) matches both, neither signature is more specific in both positions, and Julia throws an ambiguity error instead of guessing. Fair enough.
The manual's fix is a third method, f(x::Integer, y::Integer), for the intersection. Add it and the error is gone. What it doesn't tell you is what the answer should be. Is an integer pair its own mathematical case, or should it borrow one of the two algorithms on purpose? The ambiguity error turned out to be the cheap part. The original two methods never had to decide this, and now somebody does.