We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 347d647 commit 0ac4753Copy full SHA for 0ac4753
base/math.jl
@@ -1066,7 +1066,7 @@ end
1066
1067
function ^(x::Float32, n::Integer)
1068
n == 3 && return x*x*x #keep compatibility with literal_pow
1069
- n < 0 && return Float32(Base.power_by_squaring(inv(Float64(x)),n))
+ n < 0 && return Float32(Base.power_by_squaring(inv(Float64(x)),-n))
1070
Float32(Base.power_by_squaring(Float64(x),n))
1071
end
1072
@inline ^(x::Float16, y::Integer) = Float16(Float32(x) ^ y)
0 commit comments