diff --git a/base/math.jl b/base/math.jl index 082c5e89d7a95..ab06d34c2e0bf 100644 --- a/base/math.jl +++ b/base/math.jl @@ -398,8 +398,8 @@ end modf(x) = rem(x,one(x)), trunc(x) -^(x::Float64, y::Float64) = ccall((:pow,libm), Float64, (Float64,Float64), x, y) -^(x::Float32, y::Float32) = ccall((:powf,libm), Float32, (Float32,Float32), x, y) +^(x::Float64, y::Float64) = nan_dom_err(ccall((:pow,libm), Float64, (Float64,Float64), x, y), x+y) +^(x::Float32, y::Float32) = nan_dom_err(ccall((:powf,libm), Float32, (Float32,Float32), x, y), x+y) ^(x::Float64, y::Integer) = x^float64(y) ^(x::Float32, y::Integer) = x^float32(y)