Base.literal_pow(::typeof(^), x::Int, ::Val{n}) where {n} = (println("power $n"); float(x)^n) pow = -5 2^-5 # yes 2^pow # no, hence an error