[sage-support] Re: How to set global variables for maxima in sage?

2007-09-02 Thread William Stein

On 9/2/07, Nikos Apostolakis <[EMAIL PROTECTED]> wrote:
> > I'm interested in changing SAGE to use tlimswitch:true by default.
> > However, before I do that, I would like to know why Maxima sets
> > tlimswitch to false by default?  Does tlimswitch:true give incorrect
> > results in lots of interesting cases?  Or is it slower?   Or is it just 
> > inertia
> > that causes maxima to not have tlimswitch:true by default?
> >
>
> I asked in the maxima list and it seems that it's inertia, "the weight
> of history" as Rober Dodier put it.  They are considering to set
> this switch to true by default.
>

Excellent.  I want to change the sage-2.8.4 so it uses the tlimit command
to compute limits by default (that's the easiest thing to do)

... OK, I tried this, then ran SAGE's extensive tests, and it turns
out the following limit computation fails, whereas with the normal
limit
command it worked fine:

(%i4) tlimit((5^x + 3^x)^(1/x), x, inf);

** - Continuable Error
two equal vars generated
If you continue (by typing 'continue'): Return from COMMON-LISP:BREAK loop
The following restarts are also available:
MACSYMA-QUIT   :R1  Maxima top-level
Break 1 [1]>

You might want to post this to the Maxima list.

See, using the normal limit command it works fine:
(%i1) limit((5^x + 3^x)^(1/x), x, inf);
(%o1)  5



It's weird seeing "MACSYMA" above in that error -- that was the name
of the commercial version of Maxima from the '80s.

For now, I'll change the SAGE limit command so it can be used as follows,
i.e., to have a taylor=True option:

sage: limit((tan(sin(x)) - sin(tan(x)))/x^7, x=0, taylor=True)
1/30

Anyway, this will be in sage-2.8.4.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: Fwd: Sage's Bug Day 2 announcement/ideas

2007-09-02 Thread mabshoff



On Sep 1, 6:43 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On 9/1/07, mabshoff <[EMAIL PROTECTED]> wrote:
>
> > - all info about Bug Day 2 can be found athttp://www.sagemath.org:9001/bug2
> > including info about joining #sage-devel on IRC.
>
> > - I will particiapate and concentrate on memory leaks and packaging
> > issues (mostly on Solaris). I did add that info to the wiki page.
>
> I would like to propose moving this Sage Bug Day to Thursday, September 6,
> 9am (Seattle time).
>
> QUESTION: Would this be a major inconvenience for anybody?
>
> JUSTIFICATON: Several of the Seattle-based SAGE developers have
> spouses/fiance's who are really interested in a big camping trip that
> starts on Friday at 4pm, so they wouldn't be able to participate
> in much of bug day if it is on Friday.
>
> Thoughts?
>
>  -- William

Hmm, the announcement that Bug Day 2 did move to Thursday never made
it to sage-devel. So consider this the official announcement. All the
latest info can be found at

 http://www.sagemath.org:9001/bug2

Cheers,

Michael


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: How to set global variables for maxima in sage?

2007-09-02 Thread Nikos Apostolakis

"William Stein" <[EMAIL PROTECTED]> writes:

> On 9/1/07, Nikos Apostolakis <[EMAIL PROTECTED]> wrote:
>> However:
>>
>> In [3]: maxima.eval('tlimswitch:true')
>> Out[3]: 'true'
>>
>> In [35]: limit( sqrt(x^2+x+1)+x, x = -oo)
>> [...] Error maxima asks questions
>>
>> From what I understand this is not the expected behavior.
>
> No, this is exactly the expected behavior.If you want to affect
> the instance of Maxima that is used for calculus computations in SAGE,
> you have to pass a command to that one, as indicated below:
>
> sage: import sage.calculus.calculus
> sage: sage.calculus.calculus.maxima.eval('tlimswitch:true')
> 'true'
> sage: limit( (tan(sin(x)) - sin(tan(x)))/x^7, x=0)
> 1/30
>


Great! Thanks, that solves my original question.

>
>> A workaround could be to pass 'tlimit' to maxima instead of
>> 'limit'.  According to maxima documentation "tlimit" returns the
>> result of limit with 'tlimswitch' set to true.
>>
>> BTW, how can I see (from the sage command line) the code for limit?
>> When I give "limit?" I get
>>
>> def limit(f, dir=None, **argv):
>> "[...]"
>> if not isinstance(f, SymbolicExpression):
>> f = SR(f)
>> return f.limit(dir=dir, **argv)
>>
>> But where can I see the definition of f.limit?
>
> Type f.limit? and f.limit??:
>
> sage: f =  (tan(sin(x)) - sin(tan(x)))/x^7
> sage: f.limit?
> 
> sage: f.limit??
> 
>
> I'm interested in changing SAGE to use tlimswitch:true by default.
> However, before I do that, I would like to know why Maxima sets
> tlimswitch to false by default?  Does tlimswitch:true give incorrect
> results in lots of interesting cases?  Or is it slower?   Or is it just 
> inertia
> that causes maxima to not have tlimswitch:true by default?
>

I asked in the maxima list and it seems that it's inertia, "the weight
of history" as Rober Dodier put it.  They are considering to set
this switch to true by default.

> In all cases I'm certainly OK with add an option to the SAGE limit command
> that uses tlimit instead of limit.
>

That would be nice.  Doing 
"sage.calculus.calculus.maxima.eval('tlimswitch:true')"
is a bit awkward. 

Thanks,
Nikos 


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---