I think that this is a problem inherent to the way that sage
communicates to maxima. And would be difficult to correct unless every
symbolic variable/function has a different maxima, pari etc. name that
does not cause this problem.

For example I would not like the following to be supported

sage: n=var('7')
sage: n
7
sage: n+1
7 + 1
sage: n^2+n
7^2 + 7
sage: maxima(n+1)
8


On 26 abr, 17:48, Ryan Hinton <iob...@email.com> wrote:
> I'm using variable names with non-alphanumeric characters for
> convenience.  (Longer story: I have variables with two vector
> subscripts.)  Should the following be supported?
>
> sage: nn = var('n(0.1)(3.)')
>
> Creating expressions using ``nn`` seems to work fine -- as long as
> everything stays in Sage.  But when I try to do some non-trivial
> equality comparisons, Sage punts the decision to Maxima, which chokes
> on the variable name.  For example,
>
> sage: maxima(nn+2)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)
> ...
> TypeError: Error executing code in Maxima
> CODE:
>         <type 'str'>
> Maxima ERROR:
>          batchload("/home/rwh4s/.sage//temp/hostname/12453//interface//
> tmp12453-940467996");1+1308080759;
>
> <sage-display>
> apply: found n(0.1) where a function was expected.
>  -- an error. To debug this try: debugmode(true);
> <sage-display>
> (%o23)
> sage:
>
> Any suggestions?  Thanks!
>
> - Ryan
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/sage-devel
> URL:http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to