Opened 6 years ago

Closed 15 months ago

#21444 closed defect (invalid)

SR.wild and maxima don't mix

Reported by: Nils Bruin Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: Ralf Stephan Merged in:
Authors: Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This came up in ask-sage:

sage: tanh(SR.wild(0)) #for references; this works
tanh($0)
sage: coth(SR.wild(0))
ValueError: The name "" is not a valid Python identifier.

The traceback shows that this error happens when trying to parse back a maxima result with bare _SAGE_VAR_ in it (i.e., a sage variable with an empty name)

It seems #20134 is implicated.

Another problem arises when a wildcard expression gets sent to maxima:

sage: sin(SR.wild(0)).simplify_full()
TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.

It may be that we can resolve both errors by ensuring that wildcards roundtrip properly to maxima (e.g., convert them to _SAGE_WILDCARD_0 rather than the syntactically illegal _SAGE_VAR_$0 and parse them back properly too).

It may also be that by giving coth and friends a slightly different treatment we can get them in line with tanh etc.

Change History (9)

comment:1 Changed 6 years ago by Nils Bruin

Component: PLEASE CHANGEsymbolics

comment:2 Changed 6 years ago by Nils Bruin

Type: PLEASE CHANGEdefect

comment:3 Changed 6 years ago by Ralf Stephan

This works in 7.4beta3, i.e., the coth(SR.wild(0)) part, not the simplify of course.

Last edited 6 years ago by Ralf Stephan (previous) (diff)

comment:4 in reply to:  3 Changed 6 years ago by Karl-Dieter Crisman

This works in 7.4beta3, i.e., the coth(SR.wild(0)) part, not the simplify of course.

I was figuring that a Pynac upgrade might do it, because I remembered you adding those functions recently. Should we have one ticket just to doctest that works, and then leave this ticket for the round-trip issue?

comment:5 Changed 6 years ago by Ralf Stephan

Yes please.

comment:6 Changed 6 years ago by Karl-Dieter Crisman

See #21455

comment:7 Changed 5 years ago by Ralf Stephan

Milestone: sage-7.4sage-duplicate/invalid/wontfix
Status: newneeds_review

Probably a duplicate of #16335.

comment:8 Changed 15 months ago by Michael Orlitzky

Reviewers: Michael Orlitzky
Status: needs_reviewpositive_review

comment:9 Changed 15 months ago by Matthias Köppe

Resolution: invalid
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.