Skip to content

hold=True does not always prevent evaluation #23304

@mezzarobba

Description

@mezzarobba
sage: x = SR.var(x)
sage: x + 1/3
x + 1/3
sage: (x + 1/3).power(2, hold=True)
(x + 1/3)^2
sage: (x + 1/3).power(2, hold=True).mul(2, hold=True) # <<< evaluates!
2*(1/9*(3*x + 1)^2)
sage: (x + 1/3).mul(2, hold=True)
2*(x + 1/3)

Reported as pynac/pynac#262

Depends on #10035

Upstream: Fixed upstream, in a later stable release.

CC: @DaveWitteMorris @slel

Component: symbolics

Author: Frédéric Chapoton

Branch/Commit: u/chapoton/23304 @ 277efed

Issue created by migration from https://trac.sagemath.org/ticket/23304

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions