Opened 9 years ago

Last modified 5 years ago

#10073 new defect

held variables aren't restored

Reported by: kcrisman Owned by: burcin
Priority: major Milestone: sage-6.4
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

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.

Change History (7)

comment:1 Changed 9 years ago by jpflori

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

comment:2 Changed 9 years ago by kcrisman

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.

comment:3 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:7 Changed 5 years ago by rws

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.

Note: See TracTickets for help on using tickets.