From d2252d08d9b410d45a6ef955f6839ef2bcbe6ddf Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Tue, 4 Nov 2014 14:56:37 -0500 Subject: [PATCH] make #8784 work on Mac --- base/replutil.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/replutil.jl b/base/replutil.jl index b4c515fe94050..2bb0cd9b3960e 100644 --- a/base/replutil.jl +++ b/base/replutil.jl @@ -85,7 +85,8 @@ function showerror(io::IO, e::DomainError, bt) print(io, "\n", code[1], " will only return a complex result if called with a complex argument.", "\ntry ", code[1], "(complex(x))") - elseif code[1] == :^ && code[2] == symbol("intfuncs.jl") + elseif (code[1] == :^ && code[2] == symbol("intfuncs.jl")) || + code[1] == :power_by_squaring print(io, "\nCannot raise an integer x to a negative power -n. Make x a float by adding") 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") end