[sage-support] Re: Asymptotics of binomial coefficients

2011-12-29 Thread shreevatsa
[Poor formatting in the previous post; trying again.]

On Dec 29, 12:31 pm, William Stein  wrote:
> (Not meant as flaimbait) I can think of a lot of counterexamples to this,> at 
> least in the context of number theory problems that involve counting,
> which would be impossible to do in a lifetime because humans are just way
> too slow...

Yes, I agree. I thought of this actually... so I waffled a bit with
"enough patience and time", despite realizing the time required can be
more than a lifetime. :-) My fault.
Either way, I think my point stands that even if we can do something
by hand, it would still be useful for Sage to have the ability to do
it.
What needs to be done here for this particular case, does anyone know?

To answer my original question (I just thought of this), this is how I
think one can get the answer in Sage with minimum human effort. (Sage
is awesome.)

1. Look up Stirling's series to as many terms as desired. E.g.

n! = √(2πn) (n/e)^n (1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/
(2488320n^4) + O(1/n^5))
So this is √(2πn) (n/e)^n multiplied by a power series in 1/n. And
Sage can handle power series.
2. In Sage:
    sage: var('n')
    n
    sage: f = sqrt(2*pi*n) * (n/e)^n
    sage: R. = PowerSeriesRing(QQ)
    sage: g = 1 + 1/12 * x + 1/288 * x^2 - 139/51840 * x^3 -
571/2488320 * x^4 + O(x^5)

We've written the power series separately, so that factorial(n) = f(n)
* g(1/n). To check:

    sage: (f(1000)*g(1/1000)).n()
    4.02387260077094e2567
    sage: factorial(1000).n()
    4.02387260077094e2567

Cool. Now, binomial(n, n/2) = factorial(n) / factorial(n/2)^2 = f(n)/
f(n/2)^2 * g(1/n)/g(2/n)^2. So to get a series expansion for
binomial(n, n/2)/2^n:

    sage: simplify(f(n)/f(n/2)^2/2^n)
    sqrt(2)/(sqrt(pi)*sqrt(n))

and

    sage: g(x)/g(2*x)^2
    1 - 1/4*x + 1/32*x^2 + 5/128*x^3 - 21/2048*x^4 + O(x^5)

This shows that binomial(n, n/2)/2^n is

√(2/(πn)) (1 - 1/(4n) + 1/(32n^2) + 5/(128n^3) - 21/(2048n^4) + O(1/
n^5))

which coincides with the answer given by WA. Much more convenient than
multiplying and dividing power series by hand.
If the Stirling series were stored in Sage, it would avoid even the
first step of typing it in.

Thanks again for Sage,
Shreevatsa

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


[sage-support] Re: Asymptotics of binomial coefficients

2011-12-29 Thread shreevatsa
On Dec 29, 12:31 pm, William Stein  wrote:> On Dec
28, 2011 9:05 PM, "shreevatsa"  wrote:> >
On Dec 29, 3:29 am, John Cremona  wrote:> > >
This follows very easily from Stirling's Formula.  But I suppose the>
> > original question was not so much "what is the answer" as "can I
get> > > the answer from system [xyz] without having to think"!> > >
Yes!> > > After all, anything Sage can do a human can probably do with
enough> > patience and time. The point of the software is to make it
easy.> > (Not meant as flaimbait) I can think of a lot of
counterexamples to this,> at least in the context of number theory
problems that involve counting,> which would be impossible to do in a
lifetime because humans are just way> too slow...
Yes, I agree. I thought of this actually... so I waffled a bit with
"enough patience and time", despite realizing the time required can be
more than a lifetime. :-) My fault.Either way, I think my point stands
that even if we can do something by hand, it would still be useful for
Sage to have the ability to do it.What needs to be done here for this
particular case, does anyone know?
To answer my original question (I just thought of this), this is how I
think one can get the answer in Sage with minimum human effort.
1. Look up Stirling's series to as many terms as desired. E.g.
n! = √(2πn) (n/e)^n (1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/
(2488320n^4) + O(1/n^5))
So this is √(2πn) (n/e)^n multiplied by a power series in 1/n. And
Sage can handle power series.
2. In Sage:
    sage: var('n')    n    sage: f = sqrt(2*pi*n) * (n/e)^n    sage:
R. = PowerSeriesRing(QQ)    sage: g = 1 + 1/12 * x + 1/288 * x^2 -
139/51840 * x^3 - 571/2488320 * x^4 + O(x^5)
We've written the power series separately, so that factorial(n) = f(n)
* g(1/n). To check:
    sage: (f(1000)*g(1/1000)).n()    4.02387260077094e2567    sage:
factorial(1000).n()    4.02387260077094e2567
Cool. Now, binomial(n, n/2) = factorial(n) / factorial(n/2)^2 = f(n)/
f(n/2)^2 * g(1/n)/g(2/n)^2. So to get a series expansion for
binomial(n, n/2)/2^n:
    sage: simplify(f(n)/f(n/2)^2/2^n)    sqrt(2)/(sqrt(pi)*sqrt(n))
and
    sage: g(x)/g(2*x)^2    1 - 1/4*x + 1/32*x^2 + 5/128*x^3 -
21/2048*x^4 + O(x^5)
This shows that binomial(n, n/2)/2^n is
√(2/(πn)) (1 - 1/(4n) + 1/(32n^2) + 5/(128n^3) - 21/(2048n^4) + O(1/
n^5))
which coincides with the answer given by WA. Much more convenient than
multiplying and dividing power series by hand.(If the Stirling series
were stored in Sage, it would avoid even the first step of typing it
in.)
Thanks again for Sage,Shreevatsa

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


[sage-support] Re: Asymptotics of binomial coefficients

2011-12-28 Thread shreevatsa
On Dec 29, 3:29 am, John Cremona  wrote:
> >> The assymptotics of the central binomial coefficient is  more subtle
> >> matter
> >> Andrzej Chrzeszczyk
>
> > The limit:
> > sage: maxima('limit(binomial(2*x,x)/2^(2*x)*sqrt(%pi*x),x,+inf)')
> > 1
>
> > shows that
>
> > binomial(2*x,x)/2^(2*x) ~ 1/sqrt(pi*x)  as x->+oo
>
> This follows very easily from Stirling's Formula.  But I suppose the
> original question was not so much "what is the answer" as "can I get
> the answer from system [xyz] without having to think"!


Yes!

After all, anything Sage can do a human can probably do with enough
patience and time. The point of the software is to make it easy.

In this case, I would like to be able to input an expression like
binomial(n, n/2) or binomial(n, 17*n/32), and get a power series in
sqrt(n) or whatever. For instance, the Wolfram Alpha link above, after
clicking on "more terms", gives
2^(-n) (sqrt(2/pi) sqrt(1/n)-(1/n)^(3/2)/(2 sqrt(2 pi))+(1/n)^(5/2)/
(16 sqrt(2 pi))+(5 (1/n)^(7/2))/(64 sqrt(2 pi))-(21 (1/n)^(9/2))/(1024
sqrt(2 pi))-(399 (1/n)^(11/2))/(4096 sqrt(2 pi))+(869 (1/n)^(13/2))/
(32768 sqrt(2 pi))+(39325 (1/n)^(15/2))/(131072 sqrt(2 pi))-(334477 (1/
n)^(17/2))/(4194304 sqrt(2 pi))-(28717403 (1/n)^(19/2))/(16777216
sqrt(2 pi))+(59697183 (1/n)^(21/2))/(134217728 sqrt(2 pi))+O((1/
n)^(23/2))) exp(log(2) n+O((1/n)^12))

This is beyond my patience or ability to do it without mistakes.
Exactly what computers are for!

My belief is that if Wolfram Alpha can do it, it must be possible for
Sage to do it as well. It seems that something has not been
implemented here, but I'm not sure what. (The asymptotics for the
gamma function?)

Actually, Wolfram Alpha doesn't realize that exp(log(2)n) and 2^-n can
be cancelled, and the expression simplified. Further, exp(O((1/n)^7))
can be expanded as a power series. So even WA's output still requires
some human work, and there is scope for Sage to improve on it.

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


[sage-support] Re: Asymptotics of binomial coefficients

2011-12-27 Thread shreevatsa
Furthermore, I tried the original thing with gamma(n+1)/gamma(n/2+1)/
gamma(n/2+1)/2^n... that fails too, with "essential singularity"
instead of "unfamiliar singularity".
Even these fail:

sage: f = factorial(n)
sage: g = factorial(n) / (n/e)^n
sage: taylor(f, n, infinity, 2)
sage: taylor(g, n, infinity, 2)

Both fail with

TypeError: ECL says: Error executing code in Maxima: taylor:
encountered an essential singularity in:
gamma(n+1)


On Dec 28, 10:26 am, shreevatsa  wrote:
> Hi,
>
> I'm trying to use Sage to find the asymptotics of binomial
> coefficients. Specifically, I wanted to find out the rate at which
> binomial(n, n/2)/2^n goes down to 0 as n goes to infinity.
>
> See Wolfram 
> Alpha:http://www.wolframalpha.com/input/?i=%28n+choose+n%2F2%29+%2F+2%5En
> which gives a "series expansion at n=∞" from which (with some manual
> work) we can find out that it is
> sqrt(2/pi) * 1/n^(1/2)  - 1/(2*sqrt(2*pi)) * 1/n^(3/2) + O(1/n^(5/2)).
> (and presumably Mathematica does what Wolfram Alpha does too).
>
> How to do the same thing in Sage?
>
> I tried this:
>
>     sage: var('n')
>     n
>     sage: f = binomial(n, n/2) / 2^n
>     sage: f(n = 4)
>     3/8
>     sage: taylor(f, n, infinity, 2)
>
> ---
>     TypeError                                 Traceback (most recent
> call last)
>     ...
>     [snip]
>     ...
>     TypeError: ECL says: Error executing code in Maxima: taylor:
> encountered an unfamiliar singularity in:
>     binomial(n,n/2)
>
> Next, trying the trick 
> athttp://doxdrum.wordpress.com/2011/02/19/sage-tip-series-expansion/
> I tried changing n to 1/n:
>
>     sage: g = binomial(1/n, 1/(2*n)) / 2^(1/n)
>     sage: g(n = 1/4)
>     3/8
>     sage: taylor(g, n, 0, 2)
>
> ---
>     TypeError                                 Traceback (most recent
> call last)
>     ...
>     [snip]
>     ...
>     TypeError: ECL says: Error executing code in Maxima: taylor:
> encountered an unfamiliar singularity in:
>     binomial(1/n,1/(2*n))
>
> Same results. Incidentally, "taylor(f, n, 0, 2)" works, but "taylor(g,
> n, infinity, 2)" doesn't. I've also tried the same with binomial(2*n,
> n) and binomial(2/n, 1/n), and even with binomial(2*n*n, n*n) and
> binomial(2/(n*n), 1/(n*n)) (for which Wolfram Alpha sort of gives a
> power series in n instead of sqrt(n)), but the same results.
>
> Is there a way of getting the asymptotics of this function in Sage?
>
> Thanks,
> Shreevatsa

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


[sage-support] Asymptotics of binomial coefficients

2011-12-27 Thread shreevatsa
Hi,

I'm trying to use Sage to find the asymptotics of binomial
coefficients. Specifically, I wanted to find out the rate at which
binomial(n, n/2)/2^n goes down to 0 as n goes to infinity.

See Wolfram Alpha: 
http://www.wolframalpha.com/input/?i=%28n+choose+n%2F2%29+%2F+2%5En
which gives a "series expansion at n=∞" from which (with some manual
work) we can find out that it is
sqrt(2/pi) * 1/n^(1/2)  - 1/(2*sqrt(2*pi)) * 1/n^(3/2) + O(1/n^(5/2)).
(and presumably Mathematica does what Wolfram Alpha does too).

How to do the same thing in Sage?

I tried this:

sage: var('n')
n
sage: f = binomial(n, n/2) / 2^n
sage: f(n = 4)
3/8
sage: taylor(f, n, infinity, 2)
 
---
TypeError Traceback (most recent
call last)
...
[snip]
...
TypeError: ECL says: Error executing code in Maxima: taylor:
encountered an unfamiliar singularity in:
binomial(n,n/2)

Next, trying the trick at 
http://doxdrum.wordpress.com/2011/02/19/sage-tip-series-expansion/
I tried changing n to 1/n:

sage: g = binomial(1/n, 1/(2*n)) / 2^(1/n)
sage: g(n = 1/4)
3/8
sage: taylor(g, n, 0, 2)
 
---
TypeError Traceback (most recent
call last)
...
[snip]
...
TypeError: ECL says: Error executing code in Maxima: taylor:
encountered an unfamiliar singularity in:
binomial(1/n,1/(2*n))

Same results. Incidentally, "taylor(f, n, 0, 2)" works, but "taylor(g,
n, infinity, 2)" doesn't. I've also tried the same with binomial(2*n,
n) and binomial(2/n, 1/n), and even with binomial(2*n*n, n*n) and
binomial(2/(n*n), 1/(n*n)) (for which Wolfram Alpha sort of gives a
power series in n instead of sqrt(n)), but the same results.

Is there a way of getting the asymptotics of this function in Sage?

Thanks,
Shreevatsa

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


[sage-support] Conjugates

2009-02-08 Thread shreevatsa

Hello,

A friend of mine wanted to know all the conjugates of a particular
algebraic number, and I was trying to figure out the right way of
finding them with Sage. Sorry if this is too trivial a question.

This is what I tried:

sage: t = sqrt(2-sqrt(2)) + i*sqrt(sqrt(2)-1)
sage: p = t.minpoly(); p
x^8 - 12*x^6 + 6*x^4 - 12*x^2 + 1
sage: K. = NumberField(p)
sage: a.galois_conjugates(K)
[a, -a, a^7 - 12*a^5 + 6*a^3 - 12*a, -a^7 + 12*a^5 - 6*a^3 + 12*a]

I copied this result into a text editor to replace 'a' with 'x', then
did

sage: ts = [q(t).exp_simplify() for q in [x, -x, x^7 - 12*x^5 +
6*x^3 - 12*x, -x^7 + 12*x^5 - 6*x^3 + 12*x]]; ts
[sqrt(sqrt(2) - 1)*I + sqrt(2 - sqrt(2)),
 -sqrt(sqrt(2) - 1)*I - sqrt(2 - sqrt(2)),
 sqrt(sqrt(2) - 1)*I - sqrt(2 - sqrt(2)),
 sqrt(2 - sqrt(2)) - sqrt(sqrt(2) - 1)*I]

which are indeed conjugates, so it's good. But what about the other 4
roots? I guess the problem is that NumberField(p) is not big enough to
contain all the conjugates. Trying

sage: a.galois_conjugates(CC)

does give all 8 conjugates, but in decimal numbers, not in terms of
radicals, while one can get all 8 by using:

sage: a.galois_conjugates(QQ[t,i])
[a^7 + (-12)*a^5 + 6*a^3 + (-12)*a,
 (-1/8*I - 3/8)*a^7 + (11/8*I + 35/8)*a^5 + (5/8*I - 5/8)*a^3 +
(17/8*I + 21/8)*a,
 (1/8*I - 3/8)*a^7 + (-11/8*I + 35/8)*a^5 + (-5/8*I - 5/8)*a^3 +
(-17/8*I + 21/8)*a,
 (-1)*a,
 a,
 (-1/8*I + 3/8)*a^7 + (11/8*I - 35/8)*a^5 + (5/8*I + 5/8)*a^3 +
(17/8*I - 21/8)*a,
 (1/8*I + 3/8)*a^7 + (-11/8*I - 35/8)*a^5 + (-5/8*I + 5/8)*a^3 +
(-17/8*I - 21/8)*a,
 (-1)*a^7 + 12*a^5 + (-6)*a^3 + 12*a]

after which replacing the 'a's with 'x' and pasting it back as above
gives all the conjugates:

sage: ts = [q(t).exp_simplify() for q in (--replaced expression,
snipped--) ]; ts

[sqrt(sqrt(2) - 1)*I - sqrt(2 - sqrt(2)),
 (-sqrt(2) - 1)*sqrt(sqrt(2) - 1) + (-sqrt(2) - 1)*sqrt(2 - sqrt
(2)),
 sqrt(sqrt(2) - 1)*(sqrt(2) + 1) + (-sqrt(2) - 1)*sqrt(2 - sqrt
(2)),
 -sqrt(sqrt(2) - 1)*I - sqrt(2 - sqrt(2)),
 sqrt(sqrt(2) - 1)*I + sqrt(2 - sqrt(2)),
 sqrt(2 - sqrt(2))*(sqrt(2) + 1) + (-sqrt(2) - 1)*sqrt(sqrt(2) -
1),
 sqrt(sqrt(2) - 1)*(sqrt(2) + 1) + sqrt(2 - sqrt(2))*(sqrt(2) +
1),
 sqrt(2 - sqrt(2)) - sqrt(sqrt(2) - 1)*I]

So Sage completely helped with the question, which is great. :-)

My question is whether there is a better way to do this. In
particular:

1. Is there a way to avoid manually replacing 'a' with 'x' as above?
2. Here, K=NumberField(p) was not a big enough field, but K[i] was. Is
it possible to automatically choose an appropriately big field? [I
tried a.galois_conjugates(K.galois_closure('a1')) as in the
documentation, but wasn't sure how to interpret the result.]
3. It seems that while p.roots() returns an empty list and
p.complex_roots() returns the roots in decimals,

sage: (x^8 - 12*x^6 + 6*x^4 - 12*x^2 + 1).roots()

does find all roots, in terms of radicals. So might it be possible to
write a conjugates() function in cases where the polynomial *can* be
solved with radicals?
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: install_package('polymake-2.2.p4') fails

2008-03-31 Thread shreevatsa

Hello,

Any update on this issue? (The issue is:
The optional package polymake successfully gets compiled and
installed, but then does not work, failing with some Perl errors. This
is on OS X 10.4.)

I have not tried it with Sage 2.11, should I try? (Has something
changed, that is.)
Could someone else with Sage on OS X try and see if it works (is it
something I did wrong):
sage: install_package('polymake-2.2.p4') #This works
sage: polymake.cube(3) #This doesn't.

I don't know in what capacity mhampton is supposed to come to the
rescue now, but it would be great if he did :-)

Thanks,
Shreevatsa

[Previous communication retained below, for completeness.]
On Mar 23, 7:21 pm, shreevatsa <[EMAIL PROTECTED]> wrote:
> On Mar 22, 6:26 pm, mabshoff <[EMAIL PROTECTED]
>
>
>
> dortmund.de> wrote:
> > On Mar 22, 10:06 pm, shreevatsa <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 22, 3:46 pm, mabshoff <[EMAIL PROTECTED]
> > > > shreevatsa wrote:
> > > > > Hello,
>
> > > > > I tried to install_package('polymake-2.2.p4'), and it failed to build.
> > > > > I am on Mac OS X 10.4 Intel, using SAGE Version 2.10.3, Release Date:
> > > > > 2008-03-11 fromhttp://sagemath.org/SAGEbin/apple_osx/intel/
>
> > > After all this, however it still does not work fine. E.g.:
> > > {{{
> > > sage: polymake.cube(3)
> > > Can't locate loadable object for module Poly::Ext in @INC (@INC
> > > contains: /Applications/sage/local/polymake/perl /Applications/sage/
> > > local/polymake/perlx /System/Library/Perl/5.8.6/darwin-thread-
> > > multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-
> > > thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/
> > > Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /
> > > Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-
> > > multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .)
> > > at /Applications/sage/local/polymake/perl/Poly.pm line 18
> > > Compilation failed in require at /Applications/sage/local/polymake/
> > > perl/Poly.pm line 18.
> > > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > > perl/Poly.pm line 18.
> > > Compilation failed in require at /Applications/sage/local/polymake/
> > > perl/Switches.pm line 18.
> > > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > > perl/Switches.pm line 18.
> > > Compilation failed in require at /Applications/sage/local/polymake/
> > > bin//polymake line 49.
> > > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > > bin//polymake line 49.
>
> > > }}}
>
> > > The perl installation part in the install.log seemed to go fine, but
>
> > I am building Sage 2.11.alpha1 on OSX [which will be out shortly] and
> > I will test the optional polymake.spkg there to see if I can reproduce
> > and hopefully fix this,
>
> > Cheers,
>
> > Michael
>
> So mabshoff checked with 2.11.alpha1 on OS X, and says it is truly
> broken.
>
> The error was different from mine: "Poly: Modification of non-
> creatable array value attempted, subscript -1 at /Users/mabshoff/
> sage-2.11.alpha1-32bit/local/polymake/perl/Poly/Server.pm line 90".
>
> (My error was with Perl saying it "Can't locate loadable object for
> module Poly::Ext")
>
> He also mentioned a problem involving the "cube" binary in $SAGE_ROOT/
> local/bin/cube, which is a Rubik's cube solver, unrelated to
> polymake.cube()
>
> Also quoting: "
> mabshoff: Either way, mhampton is the person who can likely fix it
> easiest.
> mabshoff: But polymake is installed in an odd place.
> mabshoff: It certainly doesn't conform to default policy.
> mabshoff: Which also explains why it is optional.
> svat: So... what's to be done now?
> mabshoff: mhampton to the rescue ;)
> "
>
> I might be quoting too much text, again ;)
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: install_package('polymake-2.2.p4') fails

2008-03-23 Thread shreevatsa

On Mar 22, 6:26 pm, mabshoff <[EMAIL PROTECTED]
dortmund.de> wrote:
> On Mar 22, 10:06 pm, shreevatsa <[EMAIL PROTECTED]> wrote:
>
> > On Mar 22, 3:46 pm, mabshoff <[EMAIL PROTECTED]
> > > shreevatsa wrote:
> > > > Hello,
>
> > > > I tried to install_package('polymake-2.2.p4'), and it failed to build.
> > > > I am on Mac OS X 10.4 Intel, using SAGE Version 2.10.3, Release Date:
> > > > 2008-03-11 fromhttp://sagemath.org/SAGEbin/apple_osx/intel/
>
> > After all this, however it still does not work fine. E.g.:
> > {{{
> > sage: polymake.cube(3)
> > Can't locate loadable object for module Poly::Ext in @INC (@INC
> > contains: /Applications/sage/local/polymake/perl /Applications/sage/
> > local/polymake/perlx /System/Library/Perl/5.8.6/darwin-thread-
> > multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-
> > thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/
> > Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /
> > Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-
> > multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .)
> > at /Applications/sage/local/polymake/perl/Poly.pm line 18
> > Compilation failed in require at /Applications/sage/local/polymake/
> > perl/Poly.pm line 18.
> > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > perl/Poly.pm line 18.
> > Compilation failed in require at /Applications/sage/local/polymake/
> > perl/Switches.pm line 18.
> > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > perl/Switches.pm line 18.
> > Compilation failed in require at /Applications/sage/local/polymake/
> > bin//polymake line 49.
> > BEGIN failed--compilation aborted at /Applications/sage/local/polymake/
> > bin//polymake line 49.
>
> > }}}
>
> > The perl installation part in the install.log seemed to go fine, but
>
> I am building Sage 2.11.alpha1 on OSX [which will be out shortly] and
> I will test the optional polymake.spkg there to see if I can reproduce
> and hopefully fix this,
>
> Cheers,
>
> Michael

So mabshoff checked with 2.11.alpha1 on OS X, and says it is truly
broken.

The error was different from mine: "Poly: Modification of non-
creatable array value attempted, subscript -1 at /Users/mabshoff/
sage-2.11.alpha1-32bit/local/polymake/perl/Poly/Server.pm line 90".

(My error was with Perl saying it "Can't locate loadable object for
module Poly::Ext")

He also mentioned a problem involving the "cube" binary in $SAGE_ROOT/
local/bin/cube, which is a Rubik's cube solver, unrelated to
polymake.cube()

Also quoting: "
mabshoff: Either way, mhampton is the person who can likely fix it
easiest.
mabshoff: But polymake is installed in an odd place.
mabshoff: It certainly doesn't conform to default policy.
mabshoff: Which also explains why it is optional.
svat: So... what's to be done now?
mabshoff: mhampton to the rescue ;)
"

I might be quoting too much text, again ;)


--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Resultants of real polynomials

2008-03-23 Thread shreevatsa

Hello,

If I try to compute the resultant of two polynomials in RR['x','y'],
it fails with a NotImplemented error. Like:

R. = RR[]
p = x + y
q = x*y
p.resultant(q)

It works when I use QQ[] instead. I don't know how resultants are
computed (it seems to be done by libsingular), but if is done using a
determinant, say, then shouldn't it work for real polynomials too? Is
this perchance just an error translating Sage's real polynomials to
Singular's terms?
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---