Thanks! Could you write to Michael Abshoff (<mabs...@googlemail.com>) and ask
for a trac account, then open three trac tickets, one
for each of the above? Thanks again!
William
And I think we still want to have as many conversions between
Maxima and Sage as possible, even if Maxima isn't the default
backend for symbolic manipulation. It's still very good for
Maxima and Sage to be able to communicate. The more
capabilities for communication between Sage and other systems,
the better.
>
>> > calculus2.patch adds symbolic gamma and factorial functions.
>> > (The factorial is named fact() so it doesn't clash with the
>> > factorial in sage.rings.arith)
>
> Provided the factorial bit does not interfere with the current non-
> symbolic code this could be useful.
+1
>
>> > Finally calculus3.patch renames the symbolic factorial to factorial(),
>> > and changes all imports of sage.rings.arith.factorial to
>> > sage.calculus.calculus.factorial. I had to keep a renamed version
>> > of the factorial function in sage.rings.arith to avoid circular
>> > imports at startup.
>
> I don't like this patch at all since it forces us to use a Maxima
> function even for integers which ought to be the most common use of
> factorial.
I didn't look at the patch, but just want to comment that using
sage.calculus.calculus.factorial instead of sage.rings.arith.factorial
doesn't a priori imply that Maxima is used to compute factorials.
I.e., I could imagine an implementation where GMP is still used
for this:
sage: time n = factorial(10^6)
CPU times: user 1.90 s, sys: 0.10 s, total: 2.00 s
> When the point counting code was using Maxima to compute
> ceil, floor and sqrt the code as a whole was slower by a factor of
> three which illustrates nicely why we don't want to use Maxima unless
Do you really mean "three orders of magnitude", i.e., a factor of 1000? :-)
> there is a good reason to do so. Especially considering that using
> mpfr's functions was abotu a million times faster since there is no
> pexpect overhead. I could see using that code in case the argument is
> non-integer, but not using the highly optimized gmp implementation for
> something that is many orders of magnitude slower is just not what we
> want to do.
If a ticket is posted with the third patch, the reviewer should just make
sure that factorial(n) for input an integer (1) doesn't slow down, and (2)
returns an integer.
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
It's not only pexpect. It's that maxima via clisp is itself very slow.
> obviously applies to any system that has to communicate via pexpect
> for licensing or technical reasons, i.e. GAP, Axiom, Magma and so on,
> but computations where the communication overhead is tiny compared to
> the computational effort the pexpect overhead is negligible can employ
> pexpect without too much of a penalty. William and I disagree on this
> point, but in 10 years I see very little non-optional functionality in
> Sage provided via pexpect since someone in the Sage project will
> either have implemented the functionality natively or the project we
> are using has been library-fied some way.
I hope I'm wrong!
Thanks for the clarification. Now I remember what you're talking about.
>> > there is a good reason to do so. Especially considering that using
>> > mpfr's functions was abotu a million times faster since there is no
>> > pexpect overhead. I could see using that code in case the argument is
>> > non-integer, but not using the highly optimized gmp implementation for
>> > something that is many orders of magnitude slower is just not what we
>> > want to do.
>>
>> If a ticket is posted with the third patch, the reviewer should just make
>> sure that factorial(n) for input an integer (1) doesn't slow down, and (2)
>> returns an integer.
>
> +1
>
> Cheers,
>
> Michael
> >
>
--
> On 2 Nov., 20:46, mabshoff <mabsh...@googlemail.com> wrote:
>> On Nov 2, 11:38 am, "William Stein" <wst...@gmail.com> wrote:
>>
>>> On Sun, Nov 2, 2008 at 3:10 AM, Wilfried_Huss
>>>> I have written some code for the Maxima interface.
>>>> You can find the patches at:
>>>> http://www.math.tugraz.at/~huss/sage
>>
>>>> calculus1.patch implements the conversion from Maxima
>>>> matrices to Sage matrices.
>>
>> This should come in handy, but starting with 3.2 we will finally have
>> pynac available for some of the basic symbolic manipulation tasks. It
>> is far from bullet proof, but it is a start, so the days of Maxima as
>> the default implementation of the low level symbolic stuff is coming
>> finally to an end :)
>
> Yes, but as far as I understand Maxima will still be used for the high
> level
> symbolic stuff for the foreseeable future. So I think it makes sense
> to have
> the conversions between Sage and Maxima as complete as possible.
Yes, and even when it's not called in the background for a lot of
stuff, it will be very useful to have good conversion routines. For
example, right now there is a lot of hard work going on to improve
the sage-magma interface despite the fact that magma is an optional
package.
That sounds very good. Did you make a ticket?
- Robert