JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
541 stars 108 forks source link

`simplify_fractions` return `Float64` coefficients #466

Closed etiennedeg closed 4 months ago

etiennedeg commented 2 years ago
using SymbolicUtils
@syms x
simplify_fractions(1/x + 1/(x^2 - x))
=> 1 / (x - 1.0)
simplify_fractions(1/x + 1/(x^2 - 2x))
=> (x - 1.0) / (x^2 - 2x)
bowenszhu commented 1 year ago

Related: https://github.com/JuliaSymbolics/Symbolics.jl/issues/693#issuecomment-1209969427

hersle commented 4 months ago

After JuliaAlgebra/MultivariatePolynomials.jl/pull/296

using SymbolicUtils
@syms x
simplify_fractions(1/x + 1/(x^2 - x)), simplify_fractions(1/x + 1/(x^2 - 2x))

returns only integer/rational coefficients:

(1 / (-(1//1) + x), (-(1//1) + x) / (-2x + x^2))

So I think this can be closed.