Skip to content

Commit

Permalink
eval -> symbolic_to_float
Browse files Browse the repository at this point in the history
  • Loading branch information
n0rbed committed Sep 9, 2024
1 parent eb94612 commit d352d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solver/postprocess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ function check_trig_consts(x)
]

if any(isequal(oper, o) for o in inv_opers) && isempty(Symbolics.get_variables(x))
val = eval(Symbolics.toexpr(x))
val = Symbolics.symbolic_to_float(x)
for i in eachindex(inv_exacts)
exact_val = eval(Symbolics.toexpr(inv_exacts[i]))
exact_val = Symbolics.symbolic_to_float(inv_exacts[i])
if isapprox(exact_val, val, atol=1e-6)
return inv_exacts[i]
elseif isapprox(-exact_val, val, atol=1e-6)
Expand Down

0 comments on commit d352d8a

Please sign in to comment.