Skip to content

Incorrect rewriting of (a / b)^c into a^c / b^c (Symbolics v7) #1692

@thorek1

Description

@thorek1

In Symbolics v6 the expression (a / b)^c remains in its original form. In Symbolics v7 the same expression is automatically rewritten as a^c / b^c. This transformation is not valid in general. The equality (a / b)^c = a^c / b^c requires additional domain restrictions. It fails whenever a and b are both negative and c is non integer, or more generally whenever the bases take negative values and c is non integer.

MWE:

import Symbolics
Symbolics.@variables a b c
(a/b)^c
# v6: (a / b)^c
# v7: (a^c) / (b^c)

Reverting to the previous default behaviour would be appreciated. In case there are reasons to keep this behaviour, it would be good to have a function to transform: (a^c) / (b^c) back to (a / b)^c

Metadata

Metadata

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