Skip to content

Commit 9e22ad6

Browse files
committed
Merge branch 'master' of github.com:JuliaLang/julia
2 parents 1acf0f2 + 48dbe3a commit 9e22ad6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

base/replutil.jl

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ function showerror(io::IO, e::DomainError, bt)
8585
print(io, "\n", code[1],
8686
" will only return a complex result if called with a complex argument.",
8787
"\ntry ", code[1], "(complex(x))")
88+
elseif code[1] == :^ && code[2] == symbol("intfuncs.jl")
89+
print(io, "\nCannot raise an integer x to a negative power -n. Make x a float by adding")
90+
print(io, "\na zero decimal (e.g. 2.0^-n instead of 2^-n), or write 1/x^n, float(x)^-n, or (x//1)^-n")
8891
end
8992
break
9093
end

0 commit comments

Comments
 (0)