You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I want to generate symbolic solution to a 4d linear system. But when I simplify sol[1], it takes an hour and eventually results in a "DivideError: integer division error". This is unexpected because sol[2], sol[3] and sol[4] are simplified in several seconds. All four solutions should have a similar form.
Here is a minimal example:
using Symbolics
A = Symbolics.@variables(A[1:4, 1:4])[1] |> Symbolics.scalarize
b = Symbolics.@variables(b[1:4])[1] |> Symbolics.scalarize
sol = -(A \ b)
Symbolics.simplify(sol[4])
Symbolics.simplify(sol[3])
Symbolics.simplify(sol[2])
Symbolics.simplify(sol[1]) # takes an hour and returns an error
The reason I want to simplify the solution is that 'sol' returns 'NaN' for some values of 'A' and 'b', but the numerical solution '-A\b' can be computed correctly. Simplifying the solution resolves this problem.
The text was updated successfully, but these errors were encountered:
Hello, I want to generate symbolic solution to a 4d linear system. But when I simplify sol[1], it takes an hour and eventually results in a "DivideError: integer division error". This is unexpected because sol[2], sol[3] and sol[4] are simplified in several seconds. All four solutions should have a similar form.
Here is a minimal example:
The reason I want to simplify the solution is that 'sol' returns 'NaN' for some values of 'A' and 'b', but the numerical solution '-A\b' can be computed correctly. Simplifying the solution resolves this problem.
The text was updated successfully, but these errors were encountered: