[sage-support] Re: Why this numerical integral bombs?

2009-04-25 Thread Chris Seberino



On Apr 24, 7:09 pm, mabshoff michael.absh...@mathematik.uni-
dortmund.de wrote:
 So I cannot reproduce this. What platform are you on and are you using
 a binary, build from source, etc?

I'm on an Ubuntu 9.04 ThinkPad T41 laptop.  I built my Sage install
from 3.4 source myself as there was no binary yet for this latest
Ubuntu.

cs
--~--~-~--~~~---~--~~
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] expression evaluation with dynamically generated variables

2009-04-25 Thread Eric

Hello,

I need to be able to evaluate an expression, where the expression is
composed of dynamically generated variables. For example, I might have
a list var_list, a list data_list, and an expression exprssn.
Here
1) var_list is a list of variables, where every element in var_list
was created using sage.calculus.calculus.var
2) data_list is a list of real numbers
3) exprssn is an expression, where every variable comes from var_list

How would I evaluate exprssn when the variable var_list[i] takes the
value data_list[i]? If I try something like exprssn(var_list[i] =
data_list[i]) I get an error.

My current solution involves string generation coupled with eval
statements and is horribly clunky. What is the right way to do this?

Thanks,
Eric

--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread Paul Zimmermann

   Michael,

 And Sage 3.4:
 
 | Sage Version 3.4, Release Date: 2009-03-11 |
 | Type notebook() for the GUI, and license() for information.|
 --
 sage: numerical_integral(sin(pi*cos(x/2)),0,2)[0]
 0.85397903781471396
 
 So I cannot reproduce this. What platform are you on and are you using
 a binary, build from source, etc?

the example that failed has 'exp' instead of 'cos'. However with Sage 3.4
it works for me:

--
| Sage Version 3.4, Release Date: 2009-03-11 |
| Type notebook() for the GUI, and license() for information.|
--
sage: numerical_integral(sin(pi*exp(x/2)),0,2)[0]
-0.43734547482524966

Paul Zimmermann

--~--~-~--~~~---~--~~
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: expression evaluation with dynamically generated variables

2009-04-25 Thread Robert Bradshaw

On Apr 24, 2009, at 11:55 PM, Eric wrote:

 Hello,

 I need to be able to evaluate an expression, where the expression is
 composed of dynamically generated variables. For example, I might have
 a list var_list, a list data_list, and an expression exprssn.
 Here
 1) var_list is a list of variables, where every element in var_list
 was created using sage.calculus.calculus.var
 2) data_list is a list of real numbers
 3) exprssn is an expression, where every variable comes from var_list

 How would I evaluate exprssn when the variable var_list[i] takes the
 value data_list[i]? If I try something like exprssn(var_list[i] =
 data_list[i]) I get an error.

 My current solution involves string generation coupled with eval
 statements and is horribly clunky. What is the right way to do this?

How about this:

sage: var_list = var('x,y,z')
sage: data_list = [2,3,5]
sage: f = x^3 - y*z
sage: f.subs(dict(zip(var_list, data_list)))
-7

The zip command takes two lists, and zips them together. The dict  
can take a list of 2-tuples as a constructor.

sage: zip(var_list, data_list)
[(x, 2), (y, 3), (z, 5)]
sage: dict(zip(var_list, data_list))
{y: 3, x: 2, z: 5}

- Robert


--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread mabshoff



On Apr 25, 12:23 am, Paul Zimmermann paul.zimmerm...@loria.fr wrote:
        Michael,

Hi Paul,

  And Sage 3.4:

  | Sage Version 3.4, Release Date: 2009-03-11                         |
  | Type notebook() for the GUI, and license() for information.        |
  --
  sage: numerical_integral(sin(pi*cos(x/2)),0,2)[0]
  0.85397903781471396

  So I cannot reproduce this. What platform are you on and are you using
  a binary, build from source, etc?

 the example that failed has 'exp' instead of 'cos'. However with Sage 3.4
 it works for me:

 --
 | Sage Version 3.4, Release Date: 2009-03-11                         |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: numerical_integral(sin(pi*exp(x/2)),0,2)[0]
 -0.43734547482524966

 Paul Zimmermann

I ran this on 3.4, 3.4.1 and a couple other rc releases in between:

sage: for i in (0..200):
: numerical_integral(sin(pi*exp(x/2)),0,2)[0]
:

and I could not get a failure. Note that the most likely culprit here
is clisp IMHO. Just today I found out that clisp 2.47 doesn't build on
the latest Mandriva release in 32 and 64 bit flavors. Oh well ...

We should have an Ubuntu 9.04 test image in the not too distant
future, so maybe we will hit it there.

Cheers,

Michael
--~--~-~--~~~---~--~~
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] Dirichlet L-function

2009-04-25 Thread agi

Is there a way to compute Dirichlet L-functions
http://en.wikipedia.org/wiki/Dirichlet_L-function ?
I tried lcalc.twist_values() but it doesn't work.
--~--~-~--~~~---~--~~
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: Dirichlet L-function

2009-04-25 Thread David Joyner

After you type
lcalc.twist_values?
and look at the examples given, can you tell which command does not work,
what operating machine you are using and version of sage you are running?


On Sat, Apr 25, 2009 at 9:20 AM, agi agnes.j...@googlemail.com wrote:

 Is there a way to compute Dirichlet L-functions
 http://en.wikipedia.org/wiki/Dirichlet_L-function ?
 I tried lcalc.twist_values() but it doesn't work.
 


--~--~-~--~~~---~--~~
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: Dirichlet L-function

2009-04-25 Thread agi

The example from the reference manual p.2630

sage: lcalc.twist_values(0.5, -10, 10)
[(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3,
0.480867558),
(5, 0.231750947), (8, 0.373691713)]

works fine. But I need the value of  L( chi_3 , 2 ).
I'm using Sage Version 3.4 and the machine is an
AMD X2 4200 and 2GB RAM.

On 25 Apr., 15:38, David Joyner wdjoy...@gmail.com wrote:
 After you type
 lcalc.twist_values?
 and look at the examples given, can you tell which command does not work,
 what operating machine you are using and version of sage you are running?

 On Sat, Apr 25, 2009 at 9:20 AM, agi agnes.j...@googlemail.com wrote:

  Is there a way to compute Dirichlet L-functions
 http://en.wikipedia.org/wiki/Dirichlet_L-function?
  I tried lcalc.twist_values() but it doesn't work.
--~--~-~--~~~---~--~~
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: Minor sage 3.4/jsMath3.6b rendering issue in IE7

2009-04-25 Thread dpvc

Thanks for posting the new example.  I have found that the problem is
due to the fact that Sage puts the output inside a PRE block, and
IE7 gets confused about some of its measurements in that case.  It can
be fixed by including

  span.typeset {
 white-space: normal;
  }

in the css/main.css file for sage.  I will add this to jsMath in the
next release.

Davide
--~--~-~--~~~---~--~~
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] DSage on Amazon EC2

2009-04-25 Thread Andrzej Giniewicz

Hi,

I just wonder - does anyone have experience on running DSage on Amazon
EC2 (on preferably more than one instance) or similar Cloud-Computing
service? I'm preparing to try out the platform but because of it's non-
zero cost I'd prefer not go in blind, would be very happy if someone
who did it already could share some or any informations about how it
runs there, with what optimizations, etc

regards,
Andrzej.

--~--~-~--~~~---~--~~
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: expression evaluation with dynamically generated variables

2009-04-25 Thread Eric

Thanks, I think that answered my question!

On Apr 25, 12:35 am, Robert Bradshaw rober...@math.washington.edu
wrote:
 On Apr 24, 2009, at 11:55 PM, Eric wrote:



  Hello,

  I need to be able to evaluate an expression, where the expression is
  composed of dynamically generated variables. For example, I might have
  a list var_list, a list data_list, and an expression exprssn.
  Here
  1) var_list is a list of variables, where every element in var_list
  was created using sage.calculus.calculus.var
  2) data_list is a list of real numbers
  3) exprssn is an expression, where every variable comes from var_list

  How would I evaluate exprssn when the variable var_list[i] takes the
  value data_list[i]? If I try something like exprssn(var_list[i] =
  data_list[i]) I get an error.

  My current solution involves string generation coupled with eval
  statements and is horribly clunky. What is the right way to do this?

 How about this:

 sage: var_list = var('x,y,z')
 sage: data_list = [2,3,5]
 sage: f = x^3 - y*z
 sage: f.subs(dict(zip(var_list, data_list)))
 -7

 The zip command takes two lists, and zips them together. The dict  
 can take a list of 2-tuples as a constructor.

 sage: zip(var_list, data_list)
 [(x, 2), (y, 3), (z, 5)]
 sage: dict(zip(var_list, data_list))
 {y: 3, x: 2, z: 5}

 - Robert
--~--~-~--~~~---~--~~
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: snapshot saving

2009-04-25 Thread Rob Beezer

I have made a patch that attempts to limit the number of snapshots
that get saved (per worksheet) to an absolute maximum of 30.  There's
a bit of a dilemma about just how to do this, given that at present
some users will have more than 30 snapshots for some worksheets, and
in the future this limit might be configurable.  More details at
http://trac.sagemath.org/sage_trac/ticket/5895 - comments invited.

At http://trac.sagemath.org/sage_trac/ticket/5880 Gonzalo Tornaria has
said that since 3.4.1 snapshots that are duplicates are no longer
being created, which I can confirm with limited testing.  He has
posted there a bash script that will clean out duplicate snapshots
created by previous versions, should you want to do some more surgical
house-cleaning.
--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread Chris Seberino



On Apr 25, 2:10 am, mabshoff michael.absh...@mathematik.uni-
dortmund.de wrote:
 I ran this on 3.4, 3.4.1 and a couple other rc releases in between:

 sage: for i in (0..200):
 :     numerical_integral(sin(pi*exp(x/2)),0,2)[0]
 :

 and I could not get a failure.

Hmm. That is weird.  I just compiled 3.4.1 from source and got the
same error on the newer version too.

 We should have an Ubuntu 9.04 test image in the not too distant
 future, so maybe we will hit it there.

That seems to be the only delta between you guys and me so chances are
that's the problem.

cs
--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread mabshoff



On Apr 25, 2:17 pm, Chris Seberino cseber...@gmail.com wrote:

Hi Chris,

 On Apr 25, 2:10 am, mabshoff michael.absh...@mathematik.uni-

SNIP

 Hmm. That is weird.  I just compiled 3.4.1 from source and got the
 same error on the newer version too.

Ok.

SNIP

 That seems to be the only delta between you guys and me so chances are
 that's the problem.

Not really, we switched from clisp 2.46 to 2.47 and if you look at

https://groups.google.com/group/sage-devel/t/753a8d2f3c052183

for some people who have had issues for a long, long time we could
never get to the bottom of all the sudden they completely disappear.
Clisp seems to be working or not working depending on compiler
release, target CPU, etc, so I am not surprised you are seeing
oddities no one can reproduce. We are in progress of switching to ecl
as the basis for Maxima which will hopefully serve as a more stable
basis than clisp. Given that we want 3.4.2 out early next week the ecl
switch will probably miss the boat on that one, but since it is
essential to switch for Sage 4.0 to get Solaris support working it
will be in 4.0.

 cs

Cheers,

Michael
--~--~-~--~~~---~--~~
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: Dirichlet L-function

2009-04-25 Thread Craig Citro

Hi,

 The example from the reference manual p.2630

 sage: lcalc.twist_values(0.5, -10, 10)
 [(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3,
 0.480867558),
 (5, 0.231750947), (8, 0.373691713)]

 works fine. But I need the value of  L( chi_3 , 2 ).


I think the problem is just one of documentation. In fact, the
twist_values command calls into lcalc, and it's giving you twists by
quadratic characters with *conductor* between dmin and dmax, *not* the
characters of the form (d/.) with d between dmin and dmax. As it
happens, the Kronecker symbol (3/.) happens to have conductor 12, not
3, which is what's causing the confusion:

sage: kronecker_character(3).conductor()
12

Then this should be the value you want:

sage: lcalc.twist_values(2,12,12)
[(12, 0.949703126)]

I'll file a trac ticket about this right now ... and a patch is up:

http://trac.sagemath.org/sage_trac/ticket/5896

Anyone want to give this a quick review?

-cc

--~--~-~--~~~---~--~~
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: request for SAGE DVD

2009-04-25 Thread William Stein

2009/4/25 Bartosz Naskręcki nasq...@gmail.com:
 Dear Sir,

 I am writing to you as a student of Adam Mickiewicz University,
 Poznan, Poland since we have in May 25- 29 a huge proscience event. On
 the Department of Mathematics and Computer Science we want to promote
 the computational techniques. The prestentations are focused on high
 school students and their tutors so we thought that SAGE will be the
 best target for them since it's a free package. I am personally a user
 of the package and extensivly use it with high ranks elliptic curves
 of my own.

 If you could help us with obtaining some gadgets and free SAGE copies
 for the event I will be greatly obliged.

I don't personally provide or make Sage DVD's or other gadgets.
You might try asking on sage-support, where I've cc'd this response:

   http://groups.google.com/group/sage-support


 With respect,

 Bartosz Naskręcki

 student, IV year, mathematics
 Department of Mathematics and Computer Science
 Adam Mickiewicz University, Poznan, Poland




-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread Chris Seberino



On Apr 25, 5:36 pm, mabshoff michael.absh...@mathematik.uni-
dortmund.de wrote:
 Not really, we switched from clisp 2.46 to 2.47 and if you look at

    https://groups.google.com/group/sage-devel/t/753a8d2f3c052183

 for some people who have had issues for a long, long time we could
 never get to the bottom of all the sudden they completely disappear.

What should I do until Sage 4.0?  Is there a way to tweak my 3.4.1 to
use clisp 2.47?

cs
--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread mabshoff



On Apr 25, 6:38 pm, Chris Seberino cseber...@gmail.com wrote:
 On Apr 25, 5:36 pm, mabshoff michael.absh...@mathematik.uni-

Hi Chris,

 dortmund.de wrote:
  Not really, we switched from clisp 2.46 to 2.47 and if you look at

     https://groups.google.com/group/sage-devel/t/753a8d2f3c052183

  for some people who have had issues for a long, long time we could
  never get to the bottom of all the sudden they completely disappear.

 What should I do until Sage 4.0?  Is there a way to tweak my 3.4.1 to
 use clisp 2.47?

Do you mean clisp 2.46 since 3.4.1 ships with clisp 2.47 while Sage
3.4 used clisp 2.46?

You can force the use of clisp-2.46.spkg by running ./sage -f /patch/
to/clisp-2.46.spkg, but that will break the pure clisp mode AFAIK. It
will also not use the readline-off mode we hacked into clisp 2.47, but
if you never saw any Maxima hangs it should not matter to you too. You
must also force a rebuild of the Maxima.spkg (via ./sage -f ../maxima-
x.y.z.spkg after rebuilding clisp to make it use that version of clisp
you just build without trouble). Note that the above change will
likely be overwritten by updated Maxima and ecl.spkgs in Sage 4.0, but
not 3.4.2.

Maxima itself has a disable-readline option, but it seems broken with
Maxima 5.16.3+clisp-2.[46|47], I don't know what the status of 5.18.1
which was just released is.

 cs

Cheers,

Michael
--~--~-~--~~~---~--~~
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: request for SAGE DVD

2009-04-25 Thread Robert Bradshaw

On Apr 25, 2009, at 5:51 PM, William Stein wrote:


 2009/4/25 Bartosz Naskręcki nasq...@gmail.com:
 Dear Sir,

 I am writing to you as a student of Adam Mickiewicz University,
 Poznan, Poland since we have in May 25- 29 a huge proscience  
 event. On
 the Department of Mathematics and Computer Science we want to promote
 the computational techniques. The prestentations are focused on high
 school students and their tutors so we thought that SAGE will be the
 best target for them since it's a free package. I am personally a  
 user
 of the package and extensivly use it with high ranks elliptic curves
 of my own.

 If you could help us with obtaining some gadgets and free SAGE copies
 for the event I will be greatly obliged.

 I don't personally provide or make Sage DVD's or other gadgets.
 You might try asking on sage-support, where I've cc'd this response:

Feel free to download an iso and burn as many DVDs as you want (I can  
point you to one if you want, as soon as the binaries for the latest  
release are out).

- Robert


--~--~-~--~~~---~--~~
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: Why this numerical integral bombs?

2009-04-25 Thread Chris Seberino



On Apr 25, 7:02 pm, mabshoff michael.absh...@mathematik.uni-
dortmund.de wrote:

  What should I do until Sage 4.0?  Is there a way to tweak my 3.4.1 to
  use clisp 2.47?

 Do you mean clisp 2.46 since 3.4.1 ships with clisp 2.47 while Sage
 3.4 used clisp 2.46?

Since *I* was able to reproduce the problem on 3.4 on Ubuntu Jaunty
haven't I ruled out that clisp 2.47 is not the problem?

Is there something else I can try?

cs
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---