Skip to content

Commit

Permalink
no need to check for domain error when raising to an integer power
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 13, 2014
1 parent 80cbda6 commit c3601d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ modf(x) = rem(x,one(x)), trunc(x)
^(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)
^(x::Float64, y::Integer) = ccall((:pow,libm), Float64, (Float64,Float64), x, y)
^(x::Float32, y::Integer) = ccall((:powf,libm), Float32, (Float32,Float32), x, y)

# special functions

Expand Down

0 comments on commit c3601d4

Please sign in to comment.