Skip to content

Commit

Permalink
Fix rational exponent tests (JuliaLang#17160)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne authored and StefanKarpinski committed Jun 28, 2016
1 parent a48676c commit 6804e65
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/numbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2640,15 +2640,15 @@ end
let T = Rational
x = Complex{T}(1//3 + 1//4*im)
y = Complex{T}(1//2 + 1//5*im)
xf = Complex{Float64}(1//3 + 1//4*im)
yf = Complex{Float64}(1//2 + 1//5*im)
xf = Complex{BigFloat}(1//3 + 1//4*im)
yf = Complex{BigFloat}(1//2 + 1//5*im)
yi = 4

@test x^y big(xf)^big(yf)
@test_broken x^yi big(xf)^yi
@test_broken x^true big(xf)^true
@test x^false == big(xf)^false
@test_broken x^1 big(xf)^1
@test x^y xf^yf
@test x^yi xf^yi
@test x^true xf^true
@test x^false == xf^false
@test x^1 xf^1
@test xf^Rational(2, 1) xf*xf
@test Complex(1., 1.)^Rational(2,1) == Complex(1., 1.)*Complex(1.,1.) == Complex(0., 2.)
end
Expand Down

0 comments on commit 6804e65

Please sign in to comment.