[sage-support] Re: parametric_plot3d appears to not give the correct axes values, also steals keyboard

2009-05-07 Thread William Cauchois

I filed a ticket at http://trac.sagemath.org/sage_trac/ticket/6002.

-- Bill

--~--~-~--~~~---~--~~
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: parametric_plot3d appears to not give the correct axes values, also steals keyboard

2009-05-07 Thread William Cauchois

On Wed, May 6, 2009 at 12:28 PM, Alden alden.wal...@gmail.com wrote:

 0)
 sagenb.com is awesome, especially since Mathematica 7 takes up 100% of
 my processor at all times under Ubuntu 9.04.

Glad to hear it :).

 1)
 When I run:
 parametric_plot( (cos(t), sqrt(2)*sin(t)) , (t,0,2*pi))
 I get a nice 2d parametric plot, with the top of the ellipse clearly
 hitting close to 1.5 on the y-axis.  When I run:
 parametric_plot3d( (cos(t), 1 , sqrt(2)*sin(t)), (t,0,2*pi))
 The top of the ellipse really looks like it's at z=1, and the whole
 thing looks a lot like a circle. I realize that this is probably not a
 problem with sage and rather with whatever is doing the plotting, but
 I thought I should point it out.

I think that this is a bug, but I can't find the source of the error
very easily. I will open a Trac ticket to address this issue. Thanks
for pointing it out!

 2)
 Also, after clicking and dragging on the 3d plot, I can't type
 anywhere in firefox (the notebook or the address bar) until I click
 onto another tab and then back again.  This may be a problem with java
 in my browser not taking the keyboard away from the applet.

That's odd. Do you mean to say that even when you try to move focus
away from the Java applet using your mouse, input is still captured? I
myself use Sage on vanilla Ubuntu 9.0.4 with no difficulties. Maybe
the problem is with your Java or web browser configuration.

 3-more of a feature request than an error I guess)
 I have noticed from googling that there has been some discussion about
 creating a function from R^n to R^m.  I am sure there is some good
 reason why this isn't the case, but I was curious about whether it
 would be possible to just automatically map everything over tuples of
 symbolic expressions, or make a tuple of symbolic expressions a
 symbolic expression itself.  For example, why couldn't diff( (t, 2*t),
 t) (which gives the error that a tuple is not a symbolic expression)
 notice that the tuple is a tuple of symbolic expressions, and then
 just map itself over it to get (1,2).  Also, then defining f(x,y) =
 (2*x, 2*y) seems like it would work.  Similarly, what if there was a
 dot product function which just did the obvious thing when it was
 given two tuples of symbolic expressions?  The reason that I am
 thinking about this is that it would be really awesome if I could tell
 my vector calculus class to do a line integral by defining what f(c(t))
 =fc(t) and c(t) are and then just:
 integrate( dot( fc(t),  diff( c(t), t), t, 0, 2*pi)
 rather than something like
 integrate( vector( (t,t^2,t^3) ).dot_product( diff( vector( (t,t,t) ),
 t ) ), t,0,2*pi)
 which is a little less intuitive.

To address your diff example: it is simple enough in this case to do
[diff(f, t) for f in (t, 2*t)]. I don't know what work is being done
in Sage to help work with vector-valued functions, but maybe someone
more familiar with the symbolic calculus component can chime in.

One way to improve your line integral example would be to refactor it
into a Python function in terms of f and fc, so that students could
simply type: line_integral(f, fc). But since this is a math class, I
understand if you do not want to go that in-depth into programming
techniques.

-- Bill

--~--~-~--~~~---~--~~
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] Jmol works from command line, but not notebook

2009-05-07 Thread Dan Drake
Hello,

Jmol is not working for me from the notebook, but works fine from the
command line. I'm using 3.4.1 in Ubuntu Jaunty, with Firefox and the
icedtea Java plugin.

When I do this in a terminal, a Jmol window pops up and works great:

  sage: u, v = var('u, v')
  sage: parametric_plot3d([u*v, u, v^2], (u, -1,1), (v,-1,1))

The same commands in the notebook result in a black Jmol window and the
error message Jmol script terminated in the bottom bar of Firefox.
Here's the error messages printed to the terminal by Firefox:

Jmol applet jmolApplet1__440664173941044__ destroyed
Jmol applet jmolApplet2__440664173941044__ initializing
AppletRegistry.checkIn(jmolApplet2__440664173941044__)

urlImage=jar:file:/home/drake/.icedteaplugin/cache/https/sagenb.kaist.ac.kr/java/jmol/JmolApplet0.jar!/jmol75x29x8.gif
applet context: -applet
appletDocumentBase=https://sagenb.kaist.ac.kr:8022/home/admin/0/
appletCodeBase=https://sagenb.kaist.ac.kr:8022/java/jmol/
(C) 2008 Jmol Development
Jmol Version 11.6.16  2008-11-24 13:39
java.vendor:Sun Microsystems Inc.
java.version:1.6.0_0
os.name:Linux
memory:44.7/71.8
useCommandThread: false
appletId:jmolApplet2__440664173941044__
FileManager opening 
https://sagenb.kaist.ac.kr:8022/java/jmol/appletweb/SageMenu.mnu
defaults = Jmol
backgroundColor = black
language=en_US
FileManager opening 
https://sagenb.kaist.ac.kr:8022/home/admin/0/cells/3/sage0-size500.jmol?1241679757
script compiler ERROR: command expected
line 1 command 1 of /home/admin/0/cells/3/sage0-size500.jmol?1241679757:
   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
script ERROR: script compiler ERROR: command expected
line 1 command 1 of /home/admin/0/cells/3/sage0-size500.jmol?1241679757:
   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN 
eval ERROR: 
line 1 command 1:
 script  /home/admin/0/cells/3/sage0-size500.jmol?1241679757 

The applet on the Jmol main page works fine, as well as their browser
check page. Other Java applets work fine.

A colleague here told me that Jmol wouldn't work for him at all, and
he was using IE and Chrome. (I'm not sure if he's having the same
problem, although he is using the same server.) Any ideas on what's wrong?

Dan

-- 
---  Dan Drake dr...@kaist.edu
-  KAIST Department of Mathematical Sciences
---  http://mathsci.kaist.ac.kr/~drake


signature.asc
Description: Digital signature


[sage-support] Re: How to cimport a Sage extension class?

2009-05-07 Thread simon . king

PS:

 I tested which of these are needed for cimport of RingElement, and I
 found that SAGE_ROOT+'/local/include/csage/' suffices.

I forgot to tell:
Plus SAGE_ROOT+/devel/sage/,

Cheers,
 Simon
--~--~-~--~~~---~--~~
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] running maxima within sage and parallel computing

2009-05-07 Thread chand sarat
Dear All,
I am not a software programmer. It is possible that this question is not
rightly phrased.
I use Maxima on a Ubuntu 9.04 i386 machine for symbolic computation tasks
that arise in macroeconomics.
I am given to understand that Maxima cannot exploit parallel computing at
present while Sage can. I wish to know whether if i use Sage to run Maxima
on a multicore computer (with a cpu such as AMD Phenom II X4 955 and related
components that i shortly intend to set up) I will be able to gain in terms
of computing speed with the parallel computing prowess of Sage.
C. Saratchand

--~--~-~--~~~---~--~~
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: running maxima within sage and parallel computing

2009-05-07 Thread Harald Schilly

You could try to use dsage and running multiple instances in parallel.
http://sagemath.org/doc/reference/sage/dsage/dsage.html
Of course, you need to code something to split and combine the total
workload for each client...

h

On May 7, 11:46 am, chand sarat chandcsa...@gmail.com wrote:
 Dear All,
 I am not a software programmer. It is possible that this question is not
 rightly phrased.
 I use Maxima on a Ubuntu 9.04 i386 machine for symbolic computation tasks
 that arise in macroeconomics.
 I am given to understand that Maxima cannot exploit parallel computing at
 present while Sage can. I wish to know whether if i use Sage to run Maxima
 on a multicore computer (with a cpu such as AMD Phenom II X4 955 and related
 components that i shortly intend to set up) I will be able to gain in terms
 of computing speed with the parallel computing prowess of Sage.
 C. Saratchand
--~--~-~--~~~---~--~~
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: Jmol works from command line, but not notebook

2009-05-07 Thread Dan Drake
Well, thanks to Jason Grout for helping me on IRC...installing the Sun
Java plugin fixed the problem for me in Linux. However, now I'm home on
my Macbook, and Jmol isn't working here!

In Firefox, I get the same problem, where it's just a black box. Every
other Java thing works here, including the Jmol stuff on their website,
so this does seem like some kind of Sage or Firefox problem.

Everything works fine in Safari, so it's not a system Java issue.

Any ideas?

Dan

-- 
---  Dan Drake dr...@kaist.edu
-  KAIST Department of Mathematical Sciences
---  http://mathsci.kaist.ac.kr/~drake


signature.asc
Description: Digital signature


[sage-support] strange characters in notebook

2009-05-07 Thread gyro

Hi,
I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage
is compiled from source.
I am using the notebook interface through Firefox version 3.0.10 with
jsMath v3.6a.

In the notebook interface, when I evaluate the contents of a cell, the
proper output is 'sandwiched' between sets of strange characters.

I apologize for being ignorant as to what the characters are or
represent, but there are some square boxes containing '001B' and the
strings '[0m' and '[1;30m' repeated several times.

I have tried previous versions of both Sage (v3.3) and Firefox
(v3.0b5) and the problem is still there.

Does anyone have any ideas as to what might be happening and how to
fix the problem?

Thank you for any help you can offer.

-gyro


--~--~-~--~~~---~--~~
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: constructing a matrix from a list

2009-05-07 Thread Martin Albrecht

On Thursday 07 May 2009, Christophe Oosterlynck wrote:
 Hi,

 in a cython project of mine, I need to do some intensive work on
 arrays and then use these list in a matrix product. Doing the
 intensive work on the arrays goes smoothly when using C arrays (using
 malloc). Afterwards I convert the C array to a python list and I
 construct a matrix over GF(2) from this array so I can use Sage's
 quick GF(2) matrix multiplication. I need to do this several times and
 it seems that constructing a matrix from a list is slowing everything
 down.

Is the array a bit array or an int array with zeros and ones? If it is the 
former you might be able to just use some pointer arithmetic to convince M4RI 
that your array is its matrix. If it is the latter, it will be much quicker 
to write the C ints to the matrix directly instead of going through the list, 
something like this:

cdef Py_ssize_t i, j
for i from 0 = i  x:
for j from 0 = j  y:
mzd_write_bit(self._entries, i, j, a[i][j] % 2)

if a is your two dimensional array.

 I want to combine my algorithm to do a transformation on an array with
 the possibility to do a matrix multiplication with the list I got from
 this algorithm. Is calling matrix(GF(2), x, z, list) the best way to
 do this? I find it very slow...

The code which does the conversion is this:

for i from 0 = i  self._nrows:
if PyErr_CheckSignals(): raise KeyboardInterrupt
for j from 0 = j  self._ncols:
mzd_write_bit(self._entries,i,j, int(entries[k]) % 2)
k = k + 1

The %2 is stupid and shouldn't be required but I'd need to fix mzd_write_bit 
first (it explicitly checks for 1 instead of !=0). I don't know how expensive 
the PyErr_CheckSignals() but the generic entries lookup + the int() are 
certainly expensive. 

Bottomline: it is quite generic code which could be made somewhat faster with 
some care. However, the solution above which avoids all Python data 
structures directly will always be fastest. 

Cheers,
Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://www.informatik.uni-bremen.de/~malb
_jab: martinralbre...@jabber.ccc.de


--~--~-~--~~~---~--~~
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] Multi-thread and factor(n) problems

2009-05-07 Thread Jérôme Tremblay

I have a problem using factor() in a thread. Consider the following:

sage: class FactorThread(Thread):
: def run(self):
: factor(2^50-1)
:
sage: test = FactorThread()
sage: test.start()

Exception in thread Thread-3:
Traceback (most recent call last):
  File /Library/Sage/3.4/local/lib/python/threading.py, line 486, in
__bootstrap_inner
self.run()
  File ipython console, line 3, in run
  File /Library/Sage/3.4/local/lib/python2.5/site-packages/sage/rings/
arith.py, line 2027, in factor
int_=int_, debug_level=verbose, proof=proof), unit)
  File /Library/Sage/3.4/local/lib/python2.5/site-packages/sage/rings/
arith.py, line 1849, in __factor_using_pari
prev = pari.get_debug_level()
  File gen.pyx, line 7871, in
sage.libs.pari.gen.PariInstance.get_debug_level (sage/libs/pari/gen.c:
32133)
  File gen.pyx, line 7859, in
sage.libs.pari.gen.PariInstance.default (sage/libs/pari/gen.c:32038)
  File gen.pyx, line 9044, in sage.libs.pari.gen._pari_trap (sage/
libs/pari/gen.c:38611)
PariError:  (7)

There seems to be a problem using pari in a new thread.

Any suggestions?
Should I report this on SageTrac?


Jérôme Tremblay
LaCIM, Montréal, Canada

--~--~-~--~~~---~--~~
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: strange characters in notebook

2009-05-07 Thread Jason Grout

gyro wrote:
 Hi,
 I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage
 is compiled from source.
 I am using the notebook interface through Firefox version 3.0.10 with
 jsMath v3.6a.
 
 In the notebook interface, when I evaluate the contents of a cell, the
 proper output is 'sandwiched' between sets of strange characters.
 
 I apologize for being ignorant as to what the characters are or
 represent, but there are some square boxes containing '001B' and the
 strings '[0m' and '[1;30m' repeated several times.
 
 I have tried previous versions of both Sage (v3.3) and Firefox
 (v3.0b5) and the problem is still there.
 
 Does anyone have any ideas as to what might be happening and how to
 fix the problem?


You're using a beta version of Firefox?  Try using an official release. 
  Apparently there have been problems with some beta versions and fonts, 
which affected jsmath displaying nice typeset mathematics.

Jason



--~--~-~--~~~---~--~~
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: strange characters in notebook

2009-05-07 Thread Jason Grout

Jason Grout wrote:
 gyro wrote:
 Hi,
 I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage
 is compiled from source.
 I am using the notebook interface through Firefox version 3.0.10 with
 jsMath v3.6a.


Sorry, I should really get more sleep.  It appears that you saw this 
with a released version of Firefox.  Can you point out a specific 
published worksheet (like on sagenb.org) on which you see this problem. 
  If you can, a screenshot showing us exactly what you are seeing would 
be helpful too.


Thanks,

Jason


--~--~-~--~~~---~--~~
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: Sage for Scientific Grid

2009-05-07 Thread Serge A. Salamanka



William Stein пишет:
 On Wed, May 6, 2009 at 6:43 PM, Serge A. Salamanka salsa-...@tut.by wrote:
 Hi all,

 To start with I'd like to describe my ideas about gridification of Sage.

 This task is a very common one nowadays but it is a challenge for me.

 The very first thing I'm asking myself is how to simplify this
 gridification.
 There are lots of tools that can be used at the moment and that is why
 the biggest question comes in mind: which one to use ?


 ... read further here:

 http://sageworldmath.blogspot.com/2009/05/sage-for-scientific-grid.html



 May be someone already has experience of enabling applications for Grid ?

 
 What are you trying to compute?
 
 William
 

I'm trying to provide my colleagues from HEP with an alternative, free
and sufficient computer algebra system that will also utilize Grid
functionality.

They all use Mathematica. There is an interest in GridMathematica but it
is not available at all (due to its cost and very controlled distribution).
I used it a lot but when I have to build a knowledge base on that
expensive system, I always feel that some day it will be waisted at all.
So I'd rather be on the hard way rather then someday come to a dead end.

Computations can be of any sort...
... when you have  3000 CPUs

# Serge

  
 

--~--~-~--~~~---~--~~
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: [sage-edu] 3d tubes in SAGE

2009-05-07 Thread jason-sage

Rado wrote:
 Hello,

 To test the 3D plotting abilities of sage, I tried to implement some
 basic tube plotting like the ones here
 http://facstaff.unca.edu/mcmcclur/java/LiveMathematica/tubes.html
 (mathematica handles those beautifully).

 The code is nice and short and I think the pretty picture that comes
 out is good for SAGE posters or the show-off page in the wiki. To
 compete with mathematica all that's left is putting nicer color
 textures, but I don't know how to do that with JMOL.
   

(CCing sage-support, since this seems like it would be of wider interest)

This is nice!  It's prettier than the shorter version:

curve = vector([sin(3*x), sin(x)+2*sin(2*x), cos(x)-2*cos(2*x)])
parametric_plot(list(curve), (x, 0, 2*pi), 
thickness=30,aspect_ratio=[1,1,1])

Does anyone know why using the thickness keyword looks a little weird 
(like balls strung together, rather than a tube)?

You can change the color by using the 'color' keyword.  There are some 
predefined colors, or you can specify an RGB numeric list.

curve = vector([sin(3*x), sin(x)+2*sin(2*x), cos(x)-2*cos(2*x)])
parametric_plot(list(curve), (x, 0, 2*pi), 
thickness=30,aspect_ratio=[1,1,1], color='red')


Incidentally, I think the function should be changed to accept vectors, 
so you don't have to put the list command in there to get it to plot.

 #Original idea: 
 http://facstaff.unca.edu/mcmcclur/java/LiveMathematica/tubes.html
 #SAGE translation: Radoslav Kirov

 def vector_normalize(v):
 return v/sqrt(v*v)

 x,s = var('x,s')
 curve = vector([sin(x), cos(x),0])
 #if you are happy with the torus, try the trefoil knot
 #curve = vector([sin(3*x), sin(x)+2*sin(2*x), cos(x)-2*cos(2*x)])
 tangent = diff(curve,x)
 unit_tangent = vector_normalize(tangent)
 normal = diff(unit_tangent,x)
 #alternative is to cross_product with a random vector. This might be
 faster but will make picture uglier.
 #you will probably, need to check that the tangent is not parallel to
 [1,1,1].
 #test_vector = vector([1,1,1])
 #normal = (test_vector.cross_product(unit_tangent))
 unit_normal = vector_normalize(normal)
 unit_binormal = unit_normal.cross_product(unit_tangent)
 radius = 0.3
 parametric_plot3d(list(curve + radius * cos(s) * unit_normal + radius
 * sin(s) * unit_binormal), (x,0,2*pi),(s,0,2*pi),aspect_ratio=[1,1,1])

 Also, a warning for people who come from the world of Mathematica:

 sage: v=Vector([2,1])
 sage: v.normalize()
 (1, 1/2)

 I lost a good 15 min. on that. I am guessing this definition of
 normalize comes from polynomials but its quite weird for regular
 vector calculus.

   

Ouch.  That seems really out of place for vectors.  I agree it ought to 
be changed.

Thanks,

Jason

--~--~-~--~~~---~--~~
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: parametric_plot3d appears to not give the correct axes values, also steals keyboard

2009-05-07 Thread Alden

thanks!

On May 6, 11:33 pm, William Cauchois wcauc...@u.washington.edu
wrote:
 I filed a ticket athttp://trac.sagemath.org/sage_trac/ticket/6002.

 -- Bill
--~--~-~--~~~---~--~~
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: strange characters in notebook

2009-05-07 Thread gyro

On May 7, 9:27 am, Jason Grout jason-s...@creativetrax.com wrote:
 Jason Grout wrote:
  gyro wrote:
  Hi,
  I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage
  is compiled from source.
  I am using the notebook interface through Firefox version 3.0.10 with
  jsMath v3.6a.

 Sorry, I should really get more sleep.  It appears that you saw this
 with a released version of Firefox.  Can you point out a specific
 published worksheet (like on sagenb.org) on which you see this problem.
   If you can, a screenshot showing us exactly what you are seeing would
 be helpful too.

 Thanks,

 Jason


Hi Jason,
Using the same browser, when I create a worksheet and evaluate
expressions on sagenb.org, things look great.

Regarding the screenshot, I am reading this newsgroup through the
google groups webpage and can't include any attachments, nor can I add
the image to the file section of this group. So, I uploaded the
screenshot to a free picture hosting group:
http://tinypic.com/view.php?pic=6qgmjps=5
(Sorry, I don't know any other way to let you view the image; any
hints are appreciated)

Thanks again for your help.

-gyro
--~--~-~--~~~---~--~~
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] Unexpected error during integration

2009-05-07 Thread Alan

Hi,

I am new to Sage and am trying to reproduce a well known result that
the Fourier Transform of an exponential decay function is a Lorentzian
function.

In other words, the integral of
 exp(-abs(k)) * exp(-i2pi*k*x)
with respect to k, from 0 to +infinity (i'm integrating 0 to +inf
instead of -inf to +inf using symmetry),
should yield a Lorentzian function as the result
 1/(1+x^2)


However, when I enter into my Sage notebook:

k,x = var('k,x')
f(k,x)=exp(-abs(k))*exp(-I*2*pi*k*x)
integrate(f,k,0,Infinity)

I get back this error:
Traceback (click to the left for traceback)
...
Computation failed due to a bug in Maxima -- NOTE: Maxima had to be
restarted.

If someone can help me understand what I might be doing incorrectly,
that would be greatly appreciated!

Thanks!

--~--~-~--~~~---~--~~
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: strange characters in notebook

2009-05-07 Thread Jason Grout

gyro wrote:
 On May 7, 9:27 am, Jason Grout jason-s...@creativetrax.com wrote:
 Jason Grout wrote:
 gyro wrote:
 Hi,
 I am running Sage version 3.4.1 on a CentosOS5 Linux workstation. Sage
 is compiled from source.
 I am using the notebook interface through Firefox version 3.0.10 with
 jsMath v3.6a.
 Sorry, I should really get more sleep.  It appears that you saw this
 with a released version of Firefox.  Can you point out a specific
 published worksheet (like on sagenb.org) on which you see this problem.
   If you can, a screenshot showing us exactly what you are seeing would
 be helpful too.

 Thanks,

 Jason
 
 
 Hi Jason,
 Using the same browser, when I create a worksheet and evaluate
 expressions on sagenb.org, things look great.


So have you only observed this on your notebook server?  I'm not sure I 
can help more without being able to access a server that you see a 
problem on.  Sorry.  Can anyone else help?

Jason

-- 
Jason Grout


--~--~-~--~~~---~--~~
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: Update R to the 2.9 release with milestone Sage 4.0

2009-05-07 Thread mabshoff



On May 7, 4:24 pm, Mike Hansen mhan...@gmail.com wrote:
 On Thu, May 7, 2009 at 4:15 PM, mabshoff

 michael.absh...@mathematik.uni-dortmund.de wrote:
  Thanks for dong this work so far.

  Did you ever figure out if libintl was now mandatory?

 Wasn't it libiconv?

Yep, just checked and you are right. But I did not check if 2.9
mandated it.

 --Mike

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] Weird(?) behavior of scipy.complex

2009-05-07 Thread linuxgus

Hi all.

After importing scipy, if I run, say,

   scipy.complex128(1.0)  or even   scipy.complex128(1)
I get

   (1+0j)  ,

as I should.  However, if I run

  scipy.complex128(1.0j) ,

I get this weird error:

---SNIP--
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/cf/.sage/sage_notebook/worksheets/cfantanas/4/code/
235.py, line 7, in module
scipy.complex128(_sage_const_1p0j )
  File /home/cf/Code/APD/, line 1, in module

  File complex_number.pyx, line 879, in
sage.rings.complex_number.ComplexNumber.__float__ (sage/rings/
complex_number.c:6201)
TypeError: can't convert complex to float; use abs(z)

SNIP

I am NOT asking it to convert complex to float (at least, I don't
think I do).


I am running Sage 3.4 on  64-bit SuSE 11.1 with stock kernel
2.6.27.21-0.1, if that matters.

TIA for your responses.



--~--~-~--~~~---~--~~
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: quotient poly ring and field

2009-05-07 Thread Yihsiang Liow
TO W. Stein:
Thanks.
That was what I needed.
SAGE is a great piece of software.
I'm using it in some adv math and cryptography classes.

TO J. Palmieri:
Yes I know you can do that. But you get into minor annoyances (which you can
code around) such as E.points().



On 5/4/09, William Stein wst...@gmail.com wrote:


 On Mon, May 4, 2009 at 1:07 PM, gtg yih0siang0l...@gmail.com wrote:
 
  Hi I'm new to sage. Can you tell me how to construct finite fields
  using quotient of poly ring? For instance suppose I want to construct
  GF(5^2) using a GF(5) poly ring mod out by x^2 + x + 1 how do I do
  that? I can construct the quotient like this:
 
  p = 5
  F = GF(p)
  R.x = F['x']
  f = x * x + x + 1
  S = R.quotient(f, 'a')
 
  How do I force S to a field so that I can use it with elliptic curves?
  I know that I can simply do GF(5^2) but I want to be able to specify
  the modulus explicitly.

 Use the modulus option to GF:

 sage: p = 5
 sage: F = GF(p)
 sage: R.x = F['x']
 sage: S.a = GF(p^2,modulus=x^2+x+1)
 sage: S
 Finite Field in a of size 5^2
 sage: a^2 + a + 1
 0

 sage: GF?   # get more help!

 


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