diff --git a/base/gmp.jl b/base/gmp.jl index 971f921a69e8c..81daf52fd14bb 100644 --- a/base/gmp.jl +++ b/base/gmp.jl @@ -417,7 +417,7 @@ function ^(x::BigInt, y::Culong) return z end @generated function ^{p}(x::BigInt, ::Type{Val{p}}) - p < 0 && return :(inv(x)^p) + p < 0 && return :(inv(x)^$(-p)) return :(x^p) end