Closed shashi closed 4 months ago
What is PolyForm
? I think it is consistent with Julia, 1 / 2
is also Float
Hi! PolyForm
is a wrapper in SymbolicUtils.jl, which underlies Symbolics.jl. Reliably working with integer/rational coefficients would greatly help symbolic calculations.
Anyway, here div
is not consistent with base Julia:
julia> using DynamicPolynomials
julia> @polyvar x
(x,)
julia> div(x, x)
1.0
julia> div(7, 7)
1
Should/could this be fixed?
Thanks @hersle ! @blegat, we use div
, /
is just surface notation. PolyForm
wraps your polynomials and implements the Symbolics expression interface.
It should at best be Rational... If one of the coeffs is already Float then it makes if the output has floats.