Please quote the code by enclosing it in triple-backticks. See Please read: make it easier to help you
Conversion can be done with convert
:
using DynamicPolynomials
@polyvar x[1:3]
m = monomials(x, 0:3)
mD = differentiate.(m, x[1]) * 1.0
mD2 = convert.(Term{true, Float64}, differentiate.(m, x[1]))
mD2 == mD
true
This can be easily seen in the source code:
- https://github.com/JuliaAlgebra/DynamicPolynomials.jl/blob/master/src/term.jl#L12-L14
- https://github.com/JuliaAlgebra/DynamicPolynomials.jl/blob/master/src/poly.jl#L38-L41
If you want to be comfortable, you should also take a look at the source code.