Skip to content

Commit 5774783

Browse files
authored
fix latexify_recipes.jl for real values of type Complex
A `Complex` value with no imaginary part `isreal` but is not comparable, but the real part is.
1 parent 3afdcac commit 5774783

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/latexify_recipes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function _toexpr(O)
185185
frac_expr = Expr(:call, :/, numer_expr, denom_expr)
186186
end
187187

188-
if isreal(m.coeff) && m.coeff < 0
188+
if isreal(m.coeff) && real(m.coeff) < 0
189189
return Expr(:call, :-, frac_expr)
190190
else
191191
return frac_expr

0 commit comments

Comments
 (0)