Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

held variables aren't restored #10073

Open
kcrisman opened this issue Oct 5, 2010 · 3 comments
Open

held variables aren't restored #10073

kcrisman opened this issue Oct 5, 2010 · 3 comments

Comments

@kcrisman
Copy link
Member

kcrisman commented Oct 5, 2010

See #9879, where this was discovered. After #9901 is merged, this will be possible:

sage: I.log(hold=True).simplify()
1/2*I*pi
sage: var('I')
I
sage: I.log(hold=True).simplify()
log(I)
sage: restore('I')
sage: I.log(hold=True).simplify()
log(I)

It's totally unclear to me why this is happening. It even happens across different classes in doctesting. For now I'm putting this under symbolics, but it may be unrelated to that, and instead related to the miscellaneous commands.

Component: symbolics

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

@kcrisman kcrisman added this to the sage-5.11 milestone Oct 5, 2010
@jpflori
Copy link

jpflori commented Oct 6, 2010

comment:1

By the way, that does not happen when you do not use the hold parameter followed by the simplify call :

sage: I.log()
1/2*I*pi
sage: var('I')
I
sage: I.log()
log(I)
sage: restore('I')
sage: I.log()
1/2*I*pi

So 'I' gets restored but maybe Maxima gets the var('I') which was created and not the default numeric 'I'.

Here is another strange thing:

sage: I.log()
1/2*I*pi
sage: J = deepcopy(I)
sage: bool(I == J)
True
sage: J.log()
1.57079632679490*I

@kcrisman
Copy link
Member Author

kcrisman commented Oct 6, 2010

comment:2

Yes, Burcin says it has something to do with "a problem with restore and the maxima interface, not pynac". This seems likely. I can't explain the second thing.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst
Copy link

rwst commented Jan 31, 2015

comment:7

Something has changed here, probably with #6882:

sage: I.log(hold=True).simplify()
1/2*I*pi
sage: var('I')
I
sage: I.log(hold=True).simplify()
log(_I)
sage: restore('I')
sage: I.log(hold=True).simplify()
log(I)
sage: I.log()
1/2*I*pi
sage: I.log(hold=True).simplify_full()
log(_I)

This is not encouraging.

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants