Skip to content

Commit

Permalink
fix latexify_recipes.jl for real values of type Complex
Browse files Browse the repository at this point in the history
A `Complex` value with no imaginary part `isreal` but is not comparable, but the real part is.
  • Loading branch information
karlwessel authored Nov 26, 2024
1 parent 3afdcac commit 5774783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/latexify_recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function _toexpr(O)
frac_expr = Expr(:call, :/, numer_expr, denom_expr)
end

if isreal(m.coeff) && m.coeff < 0
if isreal(m.coeff) && real(m.coeff) < 0
return Expr(:call, :-, frac_expr)
else
return frac_expr
Expand Down

0 comments on commit 5774783

Please sign in to comment.