Skip to content

bug in simplify_fractions? #487

@jmsull

Description

@jmsull

Not sure this is exactly the place for this, but I am finding a problem with simplify_fractions.

In particular, using simplify_fractions on a simple example gives the wrong answer (in v1.7.0):

using Symbolics
@variables x y
z = 1 + (1 - x)*y^2 / (2*(1 - x))
simplify_fractions(z)

the above returns 1//0, but should return 1 + 1//2 y^2.

Maybe this is helpful for finding the issue, but there is no problem if I drop the 2 in the denominator (or the 1 + at the front, or use y instead of y^2, or use x instead of 1-x).

This may be related to the most recent comment in JuliaSymbolics/SymbolicUtils.jl#380?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions