Skip to content

Commit 0808d83

Browse files
committed
rebase on master
1 parent 550ab42 commit 0808d83

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

base/math.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -913,22 +913,15 @@ end
913913
@inline function ^(x::Float64, y::Float64)
914914
yint = unsafe_trunc(Int, y) # Note, this is actually safe since julia freezes the result
915915
y == yint && return x^yint
916-
<<<<<<< HEAD
917-
z = ccall("llvm.pow.f64", llvmcall, Float64, (Float64, Float64), x, y)
918-
if isnan(z) & !isnan(x+y)
919-
throw_exp_domainerror(x)
920-
end
921-
z
922-
=======
923-
x<0 && !isinteger(y) && throw_exp_domainerror(x)
916+
x<0 && y > -4e18 && throw_exp_domainerror(x) # |y| is small enough that y isn't an integer
917+
x == 1 && return 1.0
924918
!isfinite(x) && return x*(y>0)
925-
x==0 && return Inf*(y<0)
919+
x==0 && return abs(y)*Inf*(!(y>0))
926920
logxhi,logxlo = Base.Math._log_ext(x)
927921
xyhi = logxhi*y
928922
xylo = logxlo*y
929923
hi = xyhi+xylo
930924
return Base.Math.exp_impl(hi, xylo-(hi-xyhi), Val(:ℯ))
931-
>>>>>>> less broken
932925
end
933926
@inline function ^(x::T, y::T) where T <: Union{Float16, Float32}
934927
yint = unsafe_trunc(Int64, y) # Note, this is actually safe since julia freezes the result

0 commit comments

Comments
 (0)