Skip to content

Commit 93eaa8c

Browse files
committed
fix #26
1 parent 950a827 commit 93eaa8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Polynomial.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export polydir #Deprecated
99
import Base: length, endof, getindex, setindex!, copy, zero, one, convert
1010
import Base: show, print, *, /, //, -, +, ==, divrem, rem, eltype
1111

12-
eps{T}(::Type{T}) = convert(T,0)
12+
eps{T}(::Type{T}) = zero(T)
1313
eps{F<:FloatingPoint}(x::Type{F}) = Base.eps(F)
1414
eps{T}(x::Type{Complex{T}}) = eps(T)
1515

@@ -67,7 +67,7 @@ function print{T}(io::IO, p::Poly{T})
6767
if j == 1
6868
pj < 0 && print(io, "-") #Prepend - if first and negative
6969
else
70-
pj < 0 ? print(io," - ") : print(" + ")
70+
pj < 0 ? print(io," - ") : print(io," + ")
7171
end
7272
#Print pj if pj is the last coefficient, or pj is not identically 1
7373
if j == n || abs(magpj - 1) > 2*eps(T)
@@ -97,7 +97,7 @@ function print{T<:Complex}(io::IO, p::Poly{T})
9797
if abs(pj) > 2*eps(T)
9898
if !(abs_impj > 2*eps(T))
9999
if j > 1
100-
real(pj) < 0 ? print(io," - ") : print(" + ")
100+
real(pj) < 0 ? print(io," - ") : print(io," + ")
101101
else
102102
real(pj) < 0 && print(io, "-") #Prepend - if first and negative
103103
end

0 commit comments

Comments
 (0)