Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

held mul evaluates when power present #262

Closed
rwst opened this issue Jul 1, 2017 · 1 comment
Closed

held mul evaluates when power present #262

rwst opened this issue Jul 1, 2017 · 1 comment
Labels

Comments

@rwst
Copy link
Member

rwst commented Jul 1, 2017

From https://trac.sagemath.org/ticket/23304

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)
@rwst rwst added the bug label Jul 1, 2017
@rwst
Copy link
Member Author

rwst commented Sep 3, 2017

With ef02d73 and the hold context of Sage #10035 this becomes:

sage: hold.start()
sage: x + 1/3
x + 1/3
sage: (x + 1/3)^2
(x + 1/3)^2
sage: (x + 1/3)^2*2
2*(x + 1/3)^2
sage: (x + 1/3)*2
2*(x + 1/3)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant