Skip to content

Commit 0ac4753

Browse files
oscardssmithoscarddssmith
authored andcommitted
typo
1 parent 347d647 commit 0ac4753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/math.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ end
10661066

10671067
function ^(x::Float32, n::Integer)
10681068
n == 3 && return x*x*x #keep compatibility with literal_pow
1069-
n < 0 && return Float32(Base.power_by_squaring(inv(Float64(x)),n))
1069+
n < 0 && return Float32(Base.power_by_squaring(inv(Float64(x)),-n))
10701070
Float32(Base.power_by_squaring(Float64(x),n))
10711071
end
10721072
@inline ^(x::Float16, y::Integer) = Float16(Float32(x) ^ y)

0 commit comments

Comments
 (0)