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.
2 parents 6dfd06b + 0c55204 commit 5fc900eCopy full SHA for 5fc900e
src/types.jl
@@ -1538,7 +1538,7 @@ function ^(a::SN, b)
1538
if b isa Number && iszero(b)
1539
# fast path
1540
1
1541
- elseif b isa Number && b < 0
+ elseif b isa Real && b < 0
1542
Div(1, a ^ (-b))
1543
elseif ismul(a) && b isa Number
1544
coeff = unstable_pow(a.coeff, b)
test/basics.jl
@@ -375,6 +375,13 @@ end
375
@test isequal(x / -1, -x)
376
end
377
378
+@testset "pow" begin
379
+ @syms x
380
+
381
+ # issue 717
382
+ @test isequal(Pow(x, im), x^im)
383
+end
384
385
@testset "LiteralReal" begin
386
@syms x::LiteralReal y::LiteralReal z::LiteralReal
387
@test repr(x+x) == "x + x"
0 commit comments