Skip to content

Commit 23d7ed8

Browse files
fix: properly hashcons global constant symbolic variables
1 parent 124e11a commit 23d7ed8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symbolics.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,11 @@ include("inverse.jl")
573573
export rootfunction, left_continuous_function, right_continuous_function, @register_discontinuity
574574
include("discontinuities.jl")
575575

576+
function __init__()
577+
SymbolicUtils.hashcons(RootsOf, true)
578+
SymbolicUtils.hashcons(IM, true)
579+
end
580+
576581
@public Arr, NAMESPACE_SEPARATOR, Unknown, VariableDefaultValue, VariableSource
577582
@public _parse_vars, derivative, gradient, jacobian, sparsejacobian, hessian, sparsehessian
578583
@public get_variables, get_variables!, get_differential_vars, option_to_metadata_type, scalarize, shape

0 commit comments

Comments
 (0)