Skip to content

Commit 223de66

Browse files
committed
Fixed bug where purely imaginary numbers where displayed incorrectly; borrowed from at-jagot
1 parent 6abfd7b commit 223de66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function printterm{T<:Complex}(io::IO,p::Poly{T},j,first)
6262
end
6363
else
6464
if abs_impj > 2*eps(T)
65-
print(io,'(', imag(pj),"im)")
65+
print(io,'(', abs(imag(pj)),"im)")
6666
end
6767
end
6868
printexponent(io,p.var,j)

0 commit comments

Comments
 (0)