Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
n0rbed committed Nov 4, 2024
1 parent a94771b commit 62d8d0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solver/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function solve_univar(expression, x; dropmultiplicity=true)
factors_subbed = map(factor -> ssubs(factor, subs), factors)
arr_roots = []

if degree < 5 && isequal(expression, factors_subbed[1])
if degree < 5 && isequal(factors_subbed[1], wrap(expression))
arr_roots = get_roots(expression, x)

# multiplicities (repeated roots)
Expand All @@ -296,7 +296,7 @@ function solve_univar(expression, x; dropmultiplicity=true)
append!(arr_roots, og_arr_roots)
end
end
elseif length(factors) > 1 || (length(factors) == 1 && !isequal(factors_subbed[1], expression))
elseif length(factors) > 1 || (length(factors) == 1 && !isequal(factors_subbed[1], wrap(expression)))
for i in eachindex(factors_subbed)
if !any(isequal(x, var) for var in get_variables(factors[i]))
continue
Expand Down

0 comments on commit 62d8d0e

Please sign in to comment.