[sage-support] Re: cimport finite field fails?

2007-12-04 Thread Carlo Hamalainen

On Dec 5, 2007 6:47 AM, William Stein <[EMAIL PROTECTED]> wrote:
> In appreciation of this, any chance you could add a FAQ entry based on what
> you just learned?  thanks!
>
>http://wiki.sagemath.org/faq

I added a small example program that constructs a field and gets a few
elements since it wasn't entirely obvious to me about which
constructors to call (I'm new to Sage and Pyrex at the same time).
Perhaps the example could be moved to the cookbook at some point?

Cheers,

-- 
Carlo Hamalainen
http://carlo-hamalainen.net

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread mabshoff



On Dec 4, 10:30 pm, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
> On Dec 4, 2007, at 1:04 PM, mabshoff wrote:
>
> > On Dec 4, 9:33 pm, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
> >> On Dec 3, 2007, at 23:27 , William Stein wrote:
> >> Still seeing mwrank crashing during the tests (10.5), but no comment
> >> in the logs.
>
> > Any chance you could narrow this down to a specific doctests case,
> > i.e. input parameters for mwrank? Then I could take a look then, but
> > just shooting into the blue seems pointless.
>
> I thought I batted that ball over to your court :-}
>

Yeah, I think it actually worked ;) - but for very different reasons
than you think :)

Here is a session from sage.math with input "[0,0,1,-1,0]":

[EMAIL PROTECTED]:/tmp/Work-mabshoff/release-cycles-2.9/sage-2.9.alpha0$ /
usr/local/valgrind-3.3.0svn-r6793/bin/valgrind  --tool=memcheck --leak-
resolution=high ./local/bin/mwrank
==30271== Memcheck, a memory error detector.
==30271== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et
al.
==30271== Using LibVEX rev 1786, a library for dynamic binary
translation.
==30271== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30271== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation
framework.
==30271== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et
al.
==30271== For more details, rerun with: -v
==30271==
Program mwrank: uses 2-descent (via 2-isogeny if possible) to
determine the rank of an elliptic curve E over Q, and list a
set of points which generate E(Q) modulo 2E(Q).
and finally saturate to obtain generating points on the curve.
For more details see the file mwrank.doc.
For details of algorithms see the author's book.

Please acknowledge use of this program in published work,
and send problems to [EMAIL PROTECTED]

Version compiled on Dec  4 2007 at 15:21:47 by GCC 4.1.2 20061115
(prerelease) (Debian 4.1.1-21)
using base arithmetic option NTL_ALL (NTL bigints and multiprecision
floating point)
Using NTL multiprecision floating point with 15 decimal places.
Enter curve: [0, 0, 1, -1, 0]

Curve [0,0,1,-1,0] :Basic pair: I=48, J=-432
disc=255744
2-adic index bound = 2
By Lemma 5.1(a), 2-adic index = 1
2-adic index = 1
One (I,J) pair
Looking for quartics with I = 48, J = -432
Looking for Type 2 quartics:
Trying positive a from 1 up to 1 (square a first...)
(1,0,-6,4,1)--trivial
Trying positive a from 1 up to 1 (...then non-square a)
Finished looking for Type 2 quartics.
Looking for Type 1 quartics:
Trying positive a from 1 up to 2 (square a first...)
(1,0,0,4,4) --nontrivial...(x:y:z) = (1 : 1 : 0)
Point = [0:0:1]
height = 0.054082399688
Rank of B=im(eps) increases to 1 (The previous point is on the egg)
Exiting search for Type 1 quartics after finding one which is globally
soluble.
Mordell rank contribution from B=im(eps) = 1
Selmer  rank contribution from B=im(eps) = 1
Sha rank contribution from B=im(eps) = 0
Mordell rank contribution from A=ker(eps) = 0
Selmer  rank contribution from A=ker(eps) = 0
Sha rank contribution from A=ker(eps) = 0
Rank = 1
Searching for points (bound = 8)...==30271== Conditional jump or move
depends on uninitialised value(s)
==30271==at 0x4C393CE: qsieve::sift0(long, long, long, int) (in /
tmp/Work-mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/
libmwrank.so)
==30271==by 0x4C397DA: qsieve::sift(long) (in /tmp/Work-mabshoff/
release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4C39E1A: qsieve::search() (in /tmp/Work-mabshoff/
release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4C2BF64: mw::search(NTL::RR, int, int) (in /tmp/Work-
mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4D2BA6C: two_descent::saturate(long) (in /tmp/Work-
mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x40162C: main (in /tmp/Work-mabshoff/release-
cycles-2.9/sage-2.9.alpha0/local/bin/mwrank)
==30271==
==30271== Conditional jump or move depends on uninitialised value(s)
==30271==at 0x4C38D35: qsieve::check_point(unsigned long, long,
long, long*, int) (in /tmp/Work-mabshoff/release-cycles-2.9/
sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4C393E7: qsieve::sift0(long, long, long, int) (in /
tmp/Work-mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/
libmwrank.so)
==30271==by 0x4C397DA: qsieve::sift(long) (in /tmp/Work-mabshoff/
release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4C39E1A: qsieve::search() (in /tmp/Work-mabshoff/
release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4C2BF64: mw::search(NTL::RR, int, int) (in /tmp/Work-
mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x4D2BA6C: two_descent::saturate(long) (in /tmp/Work-
mabshoff/release-cycles-2.9/sage-2.9.alpha0/local/lib/libmwrank.so)
==30271==by 0x40162C: main (in /tmp/Work-mabshoff/release-
cycles-2.9/sag

[sage-support] Re: cimport finite field fails?

2007-12-04 Thread Carlo Hamalainen

On Dec 5, 2007 6:47 AM, William Stein <[EMAIL PROTECTED]> wrote:
> In appreciation of this, any chance you could add a FAQ entry based on what
> you just learned?  thanks!
>
>http://wiki.sagemath.org/faq

Done :-)

-- 
Carlo Hamalainen
http://carlo-hamalainen.net

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread Justin C. Walker


On Dec 4, 2007, at 1:04 PM, mabshoff wrote:
> On Dec 4, 9:33 pm, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
>> On Dec 3, 2007, at 23:27 , William Stein wrote:

>> Still seeing mwrank crashing during the tests (10.5), but no comment
>> in the logs.
>
> Any chance you could narrow this down to a specific doctests case,
> i.e. input parameters for mwrank? Then I could take a look then, but
> just shooting into the blue seems pointless.

I thought I batted that ball over to your court :-}

I know it happens during the 'tut.tex' doc test, and on a few more  
way later in the tests; the latter whiz by quickly, so it's very hard  
to peg it.

I will use the highly original trick of binary search :-}, and slice  
and dice tut.tex to see if I can nail it.  I'll try this tonight,  
when I'm home.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Enhancement of the Director's Income

When LuteFisk is outlawed,
Only outlaws will have LuteFisk





--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread mabshoff



On Dec 4, 9:33 pm, "Justin C. Walker" <[EMAIL PROTECTED]> wrote:
> On Dec 3, 2007, at 23:27 , William Stein wrote:
>
>
>
> > Hello folks,
>
> > Sage 2.8.15 has been released. It is available at
>
> >http://sagemath.org/download.html
>
> Built and tested w/o errors on Mac OS X, as follows, both with
> "parallel make":
>
> 10.4.11 (Dual Quad-Core Xeon -j6):
>  real63m1.611s
>  user48m35.838s
>  sys 25m26.978s
>
>  All tests passed!
>  Total time for all tests: 2366.0 seconds
>
> 10.5.1 (Core Duo, -j2):
>  real89m5.315s
>  user74m17.804s
>  sys 16m57.508s
>
>  All tests passed!
>  Total time for all tests: 2552.2 seconds

That is good news.

>
> Still seeing mwrank crashing during the tests (10.5), but no comment
> in the logs.

Any chance you could narrow this down to a specific doctests case,
i.e. input parameters for mwrank? Then I could take a look then, but
just shooting into the blue seems pointless.

> Justin

Cheers,

Michael

>
> --
> Justin C. Walker, Curmudgeon at Large
> Institute for the Absorption of Federal Funds
> ---
> My wife 'n kids 'n dogs are gone,
> I can't get Jesus on the phone,
> But Ol' Milwaukee's Best is my best friend.
> ---
--~--~-~--~~~---~--~~
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: cimport finite field fails?

2007-12-04 Thread William Stein

On Dec 4, 2007 12:40 PM, Carlo Hamalainen <[EMAIL PROTECTED]> wrote:
>
> On Dec 5, 2007 12:22 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
> > try:
> >
> > #clang c++
> > #clib givaro gmpxx gmp m stdc++
> > cimport sage.rings.finite_field_givaro
> >
> > i.e. you need to use C++ to compile your code as both Givaro and NTL are C++
> > libraries and you need to link in a bunch of libraries.
>
> Excellent, that works now.

In appreciation of this, any chance you could add a FAQ entry based on what
you just learned?  thanks!

   http://wiki.sagemath.org/faq

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: cimport finite field fails?

2007-12-04 Thread Carlo Hamalainen

On Dec 5, 2007 12:22 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
> try:
>
> #clang c++
> #clib givaro gmpxx gmp m stdc++
> cimport sage.rings.finite_field_givaro
>
> i.e. you need to use C++ to compile your code as both Givaro and NTL are C++
> libraries and you need to link in a bunch of libraries.

Excellent, that works now.

Thanks,

-- 
Carlo Hamalainen
http://carlo-hamalainen.net

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread Justin C. Walker


On Dec 3, 2007, at 23:27 , William Stein wrote:

>
> Hello folks,
>
> Sage 2.8.15 has been released. It is available at
>
>http://sagemath.org/download.html

Built and tested w/o errors on Mac OS X, as follows, both with  
"parallel make":

10.4.11 (Dual Quad-Core Xeon -j6):
 real63m1.611s
 user48m35.838s
 sys 25m26.978s

 All tests passed!
 Total time for all tests: 2366.0 seconds

10.5.1 (Core Duo, -j2):
 real89m5.315s
 user74m17.804s
 sys 16m57.508s

 All tests passed!
 Total time for all tests: 2552.2 seconds

Still seeing mwrank crashing during the tests (10.5), but no comment  
in the logs.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
---
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
---



--~--~-~--~~~---~--~~
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: Upgrade ate my worksheets

2007-12-04 Thread Justin C. Walker


On Dec 4, 2007, at 07:24 , William Stein wrote:

>
> On Dec 4, 2007 6:00 AM, mabshoff
> <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> On Dec 4, 11:44 am, fwc <[EMAIL PROTECTED]> wrote:
>
>
>>
>>> I'm still not sure how to recover my old worksheets.  Should I be
>>> looking elsewhere?
>>>
>>> --
>>>
>>> If the files are now going to be in  ~/.sage/sage_notebook ,  
>>> browsing
>>> there from a Mac is going to be problematic, because Finder windows
>>> ignore .* files/directories
>>>
>>
>> Well, we needed per-user notebook setups for certain scenarios,  
>> but it
>> seems that we need to sort out some of the issues caused by this
>> transition. Maybe instead of defaulting to "~/.sage" we could
>> overwrite that optionally by $SAGE_HOME?
>
> We still have that notebooks can be in multiple directories -- just  
> use
> sage -notebook path/to/directory
>
> I think adding an environment variable SAGE_HOME would just
> complicate things a lot for users.

+1 for this.

A couple of things to keep in mind.

For one, not all users will know how to deal with this (we may all  
know people who can profitably use Sage, but for whom the command  
line is the edge of a cliff they'd rather not stand too close to...)

Also, e.g., on Mac OS X, a "real app" does not have access to  
environment variables (such an app isn't started from a shell).   
Experience indicates that it can be A Bad Thing to have these in  
apps, because of the possibility of collision between the variables  
that different apps will need.  There was a long discussion of this  
on the Mac OS X TeX list a while back.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
---
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
---



--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread gginiu

oh, message at about same minute...btw... check out:
http://tolstoy.newcastle.edu.au/R/e2/help/06/10/3553.html - seem there
is optional package that can deal with it

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread Andrzej Giniewicz

I don't actually know, but as I mentioned before, even when I run
version from that package outside of sage, I get that error about
X11...
--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread William Stein

On Dec 4, 2007 8:17 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> > I was able to get the image to work last time I tried, so it's definitely
> > possible.
>
> when I do sage: r.png() I get:
>
> : Error in function (filename = "Rplot
> %03d.png", width = 480, height = 480,  :
>   X11 is not available
>
> and well.. that's both from console and notebook, and from plain
> R /opt/sage/local/bin/R... just like if it was compiled without
> graphics support, probably it could work if --with-x11 or so... and it
> seem it's the case because of hack from spkg-install:
>
> # I have problems with this on OSX Intel 10.5.1 -- for now just turn
> it off.
> # It will be good to get something fully working before worrying about
> X.
> #if [ -f /usr/include/X11/Xwindows.h ]; then
> #XSUPPORT=yes
> #else
> XSUPPORT=no
> #fi
>
> so from it I guess images are left for later :) as I'm on Linux I will
> uncomment this to test them.

(1) I very much  thought that I had done graphics with the above
build options using png.  Without those options R will definitely fail
to build on many test platforms, by the way.

(2) I don't see why X11 should be necessary to generate png files
using R -- the whole point of png's should be to avoid having to
use X11.

That said, I could be wrong about some of the above.  Does R really
require X11 as a dependency just to do png graphics?  That would suck.

OK -- I just retested this on my *linux* install, and indeed, creating
png's doesn't work because of no X11.  How annoying.

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: SAGE-2.8.15!

2007-12-04 Thread William Stein

On Dec 4, 2007 8:17 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> > I was able to get the image to work last time I tried, so it's definitely
> > possible.
>
> when I do sage: r.png() I get:
>
> : Error in function (filename = "Rplot
> %03d.png", width = 480, height = 480,  :
>   X11 is not available
>
> and well.. that's both from console and notebook, and from plain
> R /opt/sage/local/bin/R... just like if it was compiled without
> graphics support, probably it could work if --with-x11 or so... and it
> seem it's the case because of hack from spkg-install:
>
> # I have problems with this on OSX Intel 10.5.1 -- for now just turn
> it off.
> # It will be good to get something fully working before worrying about
> X.
> #if [ -f /usr/include/X11/Xwindows.h ]; then
> #XSUPPORT=yes
> #else
> XSUPPORT=no
> #fi
>
> so from it I guess images are left for later :) as I'm on Linux I will
> uncomment this to test them.

(1) I very much  thought that I had done graphics with the above
build options using png.  Without those options R will definitely fail
to build on many test platforms, by the way.

(2) I don't see why X11 should be necessary to generate png files
using R -- the whole point of png's should be to avoid having to
use X11.

That said, I could be wrong about some of the above.  Does R really
require X11 as a dependency just to do png graphics?  That would suck.

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: SAGE-2.8.15!

2007-12-04 Thread Andrzej Giniewicz

> I was able to get the image to work last time I tried, so it's definitely
> possible.

when I do sage: r.png() I get:

: Error in function (filename = "Rplot
%03d.png", width = 480, height = 480,  :
  X11 is not available

and well.. that's both from console and notebook, and from plain
R /opt/sage/local/bin/R... just like if it was compiled without
graphics support, probably it could work if --with-x11 or so... and it
seem it's the case because of hack from spkg-install:

# I have problems with this on OSX Intel 10.5.1 -- for now just turn
it off.
# It will be good to get something fully working before worrying about
X.
#if [ -f /usr/include/X11/Xwindows.h ]; then
#XSUPPORT=yes
#else
XSUPPORT=no
#fi

so from it I guess images are left for later :) as I'm on Linux I will
uncomment this to test them.

regards,
Andrzej.

--~--~-~--~~~---~--~~
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: deleting published worksheets

2007-12-04 Thread William Stein

On Dec 4, 2007 7:42 AM, john_perry_usm <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm sure I've seen this somewhere, but I can't find it now. How do I
> delete a published worksheet?

This is unfortunately not implemented.   It will hopefully get implemented
soon... i.e., when the quarter is over.

 -- 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: SAGE-2.8.15!

2007-12-04 Thread William Stein

On Dec 4, 2007 7:51 AM, gginiu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > sage: install_package('sage -i r-2.6.1rc.p1')
>
> I actually installed through command line, but it's mostly same - it
> went ok, but.
>
> > and report back whether the install works for you or not (it's an 
> > experimental
> > package still, which means that it's likely to *not* work for a lot of 
> > people).
>
> I had to edit manually in 2 places, first $SAGE_HOME/local/bin/R has
> variable R_HOME_DIR pointing to build dir instead of install dir,
> after changing it to right dir I was able to import rpy, because
> before it failed...

Actually, I had posted the wrong direction -- it's still the case that R builds
in the build directory, the install points to that ("make install" for R
doesn't work like for a normal program), then the build directory gets deleted.

See this thread on R in SAge, which has better directions:

http://groups.google.com/group/sage-devel/browse_thread/thread/ca048c096d1819a7/cabec61dcb551eee?lnk=gst&q=rpy#cabec61dcb551eee

In particular, it is best to build like this

 sage -f -m r-2.6.1rc.p1

to leave the build directory around afterwards.

> > If it does install, try this:
> >
> > sage: import rpy
>
> I did:
>
> sage: from rpy import *
>
> and it worked so quite ok... but not exactly yet :)... at first when I
> wanted to check r object I was getting traceback about missing
> variable, after change in file rpy.py in line 312 from
>
>Rver = self.__getitem__('R_version_string')
>
> to
>
>Rver = self.__getitem__('R.version.string')
>
> it started to report version, it said:
>
> RPy version 1.0-RC3 [R version 2.6.1 RC (2007-11-24 r43532)]
>
> so ok...
>
> > sage: rpy.r.t_test(range(100))
>
> that test works like a charm...
>
> > Check out
> >  rpy.sourceforge.net
> > for more discussion about rpy, which provides a very
> > fast interface to essentially all the functionality of R.
> > NOTE: As of now, you'll probably want to do
> > sage: RealNumber = float; Integer = int
> > to turn off preparsing of floats and ints when using R, since
> > the patch for making R play nicely with Sage types isn't in
> > yet.
>
> I noticed Integer -> int problem when I was trying
> http://rpy.sourceforge.net/rpy_demo.html, got without glitch to some
> place, now I try to get:
>
> sage: r.png('faithful_histogram.png',width=int(733),height=int(550))
>
> but no luck currently, anyway I'm still looking around... :)

I was able to get the image to work last time I tried, so it's definitely
possible.

 -- Wiliam

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread gginiu

Hi,

> sage: install_package('sage -i r-2.6.1rc.p1')

I actually installed through command line, but it's mostly same - it
went ok, but.

> and report back whether the install works for you or not (it's an experimental
> package still, which means that it's likely to *not* work for a lot of 
> people).

I had to edit manually in 2 places, first $SAGE_HOME/local/bin/R has
variable R_HOME_DIR pointing to build dir instead of install dir,
after changing it to right dir I was able to import rpy, because
before it failed...

> If it does install, try this:
>
> sage: import rpy

I did:

sage: from rpy import *

and it worked so quite ok... but not exactly yet :)... at first when I
wanted to check r object I was getting traceback about missing
variable, after change in file rpy.py in line 312 from

   Rver = self.__getitem__('R_version_string')

to

   Rver = self.__getitem__('R.version.string')

it started to report version, it said:

RPy version 1.0-RC3 [R version 2.6.1 RC (2007-11-24 r43532)]

so ok...

> sage: rpy.r.t_test(range(100))

that test works like a charm...

> Check out
>  rpy.sourceforge.net
> for more discussion about rpy, which provides a very
> fast interface to essentially all the functionality of R.
> NOTE: As of now, you'll probably want to do
> sage: RealNumber = float; Integer = int
> to turn off preparsing of floats and ints when using R, since
> the patch for making R play nicely with Sage types isn't in
> yet.

I noticed Integer -> int problem when I was trying
http://rpy.sourceforge.net/rpy_demo.html, got without glitch to some
place, now I try to get:

sage: r.png('faithful_histogram.png',width=int(733),height=int(550))

but no luck currently, anyway I'm still looking around... :)

regards,
Andrzej.

PS.: maybe this should be in separate topic or other list? currently I
use only "reply" from browser, but I think there will be lot more
reports about this :)

--~--~-~--~~~---~--~~
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] deleting published worksheets

2007-12-04 Thread john_perry_usm

Hi,

I'm sure I've seen this somewhere, but I can't find it now. How do I
delete a published worksheet?

regards
john perry
--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread William Stein

On Dec 4, 2007 6:25 AM, gginiu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > There already is an optional/experimental R.spkg and because of rpy
> > little integration work into Python needs to be done. It will probably
> > take a while to expose all the functionality desired by Sage
> > developers directly, but we need to start by including it.
>
> well, then if there is anything I can help with - from testing to
> whatever - you can count me in :) I'm already downloading it :)

Please type

sage: install_package('sage -i r-2.6.1rc.p1')

and report back whether the install works for you or not (it's an experimental
package still, which means that it's likely to *not* work for a lot of people).

If it does install, try this:

sage: import rpy
sage: rpy.r.t_test(range(100))

Check out
 rpy.sourceforge.net
for more discussion about rpy, which provides a very
fast interface to essentially all the functionality of R.
NOTE: As of now, you'll probably want to do
sage: RealNumber = float; Integer = int
to turn off preparsing of floats and ints when using R, since
the patch for making R play nicely with Sage types isn't in
yet.

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: Upgrade ate my worksheets

2007-12-04 Thread William Stein

On Dec 4, 2007 6:00 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Dec 4, 11:44 am, fwc <[EMAIL PROTECTED]> wrote:


>
> > I'm still not sure how to recover my old worksheets.  Should I be
> > looking elsewhere?
> >
> > --
> >
> > If the files are now going to be in  ~/.sage/sage_notebook , browsing
> > there from a Mac is going to be problematic, because Finder windows
> > ignore .* files/directories
> >
>
> Well, we needed per-user notebook setups for certain scenarios, but it
> seems that we need to sort out some of the issues caused by this
> transition. Maybe instead of defaulting to "~/.sage" we could
> overwrite that optionally by $SAGE_HOME?

We still have that notebooks can be in multiple directories -- just use
sage -notebook path/to/directory

I think adding an environment variable SAGE_HOME would just
complicate things a lot for users.

 -- 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: Upgrade ate my worksheets

2007-12-04 Thread William Stein

On Dec 4, 2007 6:00 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Dec 4, 11:44 am, fwc <[EMAIL PROTECTED]> wrote:
> > I successfully upgraded 2.8.14 -> 2.8.15 [Mac OS X 10.4.11, 2 GHz
> > Intel Core 2 Duo, 1 GB].
> >
> > But my worksheets do not appear when I do  sage -notebook

Your worksheets are *not* being eaten.   In the new version of Sage
the default place the notebook commands looks for the sage_notebook
directory is $HOME/.sage/sage_notebook.However,

  (1) You could tell Sage to use a notebook located anywhere.  E.g., if you
start Sage in your home directory and type
 sage -notebook sage_notebook
it will use the sage notebook in your home directory exactly as before.

  (2) You could copy (do that -- don't just move them -- for safety)
your notebook
files from your home directory to $HOME/.sage/sage_notebook, e.g., by doing
the following:
   (a) Make sure to stop all notebook processes
   (b) From Terminal type
  $ cd; cp -r sage_notebook .sage/
   (c) Then sage -notebook should show all your old notebook files.

  (3) General comment -- you never have to tediously download and upload
all your worksheets to migrate your notebooks -- they're all just in a directory
that you can move to another location. ]

  (4) You can browse $HOME/.sage in finder by typing
$ cd; open .sage
  in the Terminal.


> >
> > I'm told that "The notebook files are stored in:  ~/.sage/
> > sage_notebook", but there's no trace there.  However they do seem to
> > be in  ~/sage_notebook .  I tried using the "upload" link in the sage
> > in SAGE:Worksheet List and browsing into  ~/sage_notebook, but the
> > only human readable files I could find (which do indeed contain the
> > old worksheet details I want) were, for example, ~/sage_notebook/
> > worksheets/admin/3/worksheet.txt .  However they all gave rise to
> >
> > Error uploading worksheet 'Error decompressing saved worksheet.'.
> >
>
> Ok, this is a serious upgrade issue that needs to be fixed.
>
> > I'm still not sure how to recover my old worksheets.  Should I be
> > looking elsewhere?
> >
> > --
> >
> > If the files are now going to be in  ~/.sage/sage_notebook , browsing
> > there from a Mac is going to be problematic, because Finder windows
> > ignore .* files/directories
> >
>
> Well, we needed per-user notebook setups for certain scenarios, but it
> seems that we need to sort out some of the issues caused by this
> transition. Maybe instead of defaulting to "~/.sage" we could
> overwrite that optionally by $SAGE_HOME?
>
> > Francis
>
> Cheers,
>
> Michael
>
> >
>



-- 
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 [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: SAGE-2.8.15!

2007-12-04 Thread mabshoff



On Dec 4, 3:25 pm, gginiu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > There already is an optional/experimental R.spkg and because of rpy
> > little integration work into Python needs to be done. It will probably
> > take a while to expose all the functionality desired by Sage
> > developers directly, but we need to start by including it.
>
> well, then if there is anything I can help with - from testing to
> whatever - you can count me in :) I'm already downloading it :)

Feel free to report any issues you encounter. I believe Mike Hansen is
taking point on this, but William also certainly wants R to happen. It
might be a good idea to meet in IRC at some point this week and do an
integration/testing session with interested people.

> A.

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: SAGE-2.8.15!

2007-12-04 Thread gginiu

Hi,

> There already is an optional/experimental R.spkg and because of rpy
> little integration work into Python needs to be done. It will probably
> take a while to expose all the functionality desired by Sage
> developers directly, but we need to start by including it.

well, then if there is anything I can help with - from testing to
whatever - you can count me in :) I'm already downloading it :)

A.

--~--~-~--~~~---~--~~
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: cimport finite field fails?

2007-12-04 Thread Martin Albrecht

Hi Carlo,

try:

#clang c++
#clib givaro gmpxx gmp m stdc++
cimport sage.rings.finite_field_givaro

i.e. you need to use C++ to compile your code as both Givaro and NTL are C++ 
libraries and you need to link in a bunch of libraries. 

Martin

PS: I know, "clang c++" is not a very nice idea for an option.

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
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: cimport finite field fails?

2007-12-04 Thread mabshoff



On Dec 3, 11:32 pm, "Carlo Hamalainen" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I want to write a spyx file to do some things with finite fields. I'm
> guessing that my first step is to cimport either finite_field_givaro
> or finite_field_ntl_gf2e (given that the pxd files exist in my sage
> source tree) but both of these fail. Am I doing something wrong here?
>
> [EMAIL PROTECTED]:/tmp$ cat test.spyx
>
> cimport sage.rings.finite_field_givaro
>
> [EMAIL PROTECTED]:/tmp$ sage
> --
> | SAGE Version 2.8.14, Release Date: 2007-11-24  |
> | Type notebook() for the GUI, and license() for information.|
> --
>
> sage: load "test.spyx"
> Compiling test.spyx...
> Error compiling cython file:
> Error compiling test.spyx:
> running build
> running build_ext
> building 'test_spyx_0' extension
> creating build
> creating build/temp.linux-i686-2.5
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -fPIC -I/opt/sage/local/include/csage/ -I/opt/sage/local/include/
> -I/opt/sage/local/include/python2.5/
>  -I/opt/sage/devel/sage/sage/ext/ -I/opt/sage/devel/sage/
> -I/opt/sage/devel/sage/sage/gsl/ -I
> -I/opt/sage/local/include/python2.5 -c test_spyx_0.c -o
> build/temp.linux-i6
> 86-2.5/test_spyx_0.o -w
>
> In file included from test_spyx_0.c:38:
> /opt/sage/local/include/givaro/givconfig.h:193:18: error: limits: No
> such file or directory
>
> This is odd because I do have a limits include file for C/C++:
>
> [EMAIL PROTECTED]:~$ find /usr/include/ -iname '*limits*'
> /usr/include/linux/limits.h
> /usr/include/limits.h
> /usr/include/x86_64-linux-gnu/limits.h
> /usr/include/c++/4.2/tr1/climits
> /usr/include/c++/4.2/tr1/limits.h
> /usr/include/c++/4.2/climits
> /usr/include/c++/4.2/limits
>
> Trying finite_field_ntl_gf2e fails in a different way:
>
> [EMAIL PROTECTED]:/tmp$ cat test.spyx
>
> cimport sage.rings.finite_field_ntl_gf2e
>
> [EMAIL PROTECTED]:/tmp$ sage
> --
> | SAGE Version 2.8.14, Release Date: 2007-11-24  |
> | Type notebook() for the GUI, and license() for information.|
> --
>
> sage: load "test.spyx"
> Compiling test.spyx...
> Error compiling cython file:
> Error compiling test.spyx:
> running build
> running build_ext
> building 'test_spyx_0' extension
> creating build
> creating build/temp.linux-i686-2.5
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -fPIC -I/opt/sage/local/include/csage/ -I/opt/sage/local/include/
> -I/opt/sage/local/include/python2.5/
>  -I/opt/sage/devel/sage/sage/ext/ -I/opt/sage/devel/sage/
> -I/opt/sage/devel/sage/sage/gsl/ -I
> -I/opt/sage/local/include/python2.5 -c test_spyx_0.c -o
> build/temp.linux-i6
> 86-2.5/test_spyx_0.o -w
>
> test_spyx_0.c:1481: error: field 'F' has incomplete type
> test_spyx_0.c:1512: error: field 'x' has incomplete type
> error: command 'gcc' failed with exit status 1
>
> Full logs:  http://carlo-hamalainen.net/sagetmp/err1.txt
>  http://carlo-hamalainen.net/sagetmp/err2.txt
>
> My version of gcc:
>
> [EMAIL PROTECTED]:~$ gcc -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
> --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr
> --enable-targets=all --enable-checking=release --build=i486-linux-gnu
> --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
>
> Any ideas?

Hello Carlo,

have a look a the top of "sage/rings/finite_field_givaro.pxd", there
are some includes there that you might need to copy into your own
code. Since I am pressed for time I cannot debug this right now, but I
am hoping that including some of those includes will fix the problem
for you.

Cheers,

Michael

>
> --
> Carlo Hamalainenhttp://carlo-hamalainen.net
--~--~-~--~~~---~--~~
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: Upgrade ate my worksheets

2007-12-04 Thread mabshoff



On Dec 4, 11:44 am, fwc <[EMAIL PROTECTED]> wrote:
> I successfully upgraded 2.8.14 -> 2.8.15 [Mac OS X 10.4.11, 2 GHz
> Intel Core 2 Duo, 1 GB].
>
> But my worksheets do not appear when I do  sage -notebook
>
> I'm told that "The notebook files are stored in:  ~/.sage/
> sage_notebook", but there's no trace there.  However they do seem to
> be in  ~/sage_notebook .  I tried using the "upload" link in the sage
> in SAGE:Worksheet List and browsing into  ~/sage_notebook, but the
> only human readable files I could find (which do indeed contain the
> old worksheet details I want) were, for example, ~/sage_notebook/
> worksheets/admin/3/worksheet.txt .  However they all gave rise to
>
> Error uploading worksheet 'Error decompressing saved worksheet.'.
>

Ok, this is a serious upgrade issue that needs to be fixed.

> I'm still not sure how to recover my old worksheets.  Should I be
> looking elsewhere?
>
> --
>
> If the files are now going to be in  ~/.sage/sage_notebook , browsing
> there from a Mac is going to be problematic, because Finder windows
> ignore .* files/directories
>

Well, we needed per-user notebook setups for certain scenarios, but it
seems that we need to sort out some of the issues caused by this
transition. Maybe instead of defaulting to "~/.sage" we could
overwrite that optionally by $SAGE_HOME?

> Francis

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: SAGE-2.8.15!

2007-12-04 Thread mabshoff



On Dec 4, 11:24 am, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
> WooHoo :)
>
> that's great news... I'm just upgrading it to look around asap... :)
>
> btw, is it really true that R interface is so-almost-ready that it
> could be included in release planned for end of week so in few days? I
> would be quite amazed to see it so soon :)

There already is an optional/experimental R.spkg and because of rpy
little integration work into Python needs to be done. It will probably
take a while to expose all the functionality desired by Sage
developers directly, but we need to start by including it.

> regards,
> Andrzej Giniewicz.

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: Weaning

2007-12-04 Thread David Harvey


On Dec 4, 2007, at 5:09 AM, fwc wrote:

>>> 1)  Taylor series of a rational function.
>>
>>> This works:
>>> sage: cos(x).taylor(x,0,2)
>>
>>> This doesn't:
>>> sage: x/(1+x).taylor(x,0,2)
>>
>>> This is very confusing:
>
>> This is due to the fact that '.' binds tighter than '/'.  For  
>> example,
>> sage: x/(1+x).taylor(x,0,2)
>> x/(x + 1)
>> sage: x/((1+x).taylor(x,0,2))
>> x/(x + 1)
>> sage: (x/(1+x)).taylor(x,0,2)
>> x - x^2
>>
>> In Sage, "(x/(1+x))" creates an object and the you call the taylor()
>> method on that object.
>
> Mathematica has the advantage that Series creates a truncated series
> object rather than a polynomial.  Thus it doesn't matter whether the
> division is done before or after:
>
> sage: mathematica("x/Series[1+x, {x, 0, 1}]")
> SeriesData[x, 0, {1, -1}, 1, 3, 1]
> sage: mathematica("Series[x/(1+x), {x, 0, 2}]")
> SeriesData[x, 0, {1, -1}, 1, 3, 1]

H this is an excellent point. We do have a PowerSeriesRing which  
can keep track of where you truncated to, but it's only used in a  
more strictly algebraic setting, it's not really part of the symbolic  
calculus package. Is it possible for the symbolic calculus package to  
do something similar to this? What about creating a PowerSeriesRing  
with the SymbolicExpressionRing as the base ring?


sage: R. = PowerSeriesRing(SymbolicExpressionRing)
 
---
 Traceback (most recent call  
last)

/Users/david/ in ()

/Users/david/sage-2.8.14/local/lib/python2.5/site-packages/sage/rings/ 
power_series_ring.py in PowerSeriesRing(base_ring, name,  
default_prec, names, sparse)
 171 R = PowerSeriesRing_generic(base_ring, name,  
default_prec, sparse=sparse)
 172 else:
--> 173 raise TypeError, "base_ring must be a commutative ring"
 174 _cache[key] = weakref.ref(R)
 175 return R

: base_ring must be a commutative ring


Well maybe not

Would be nice though

david


--~--~-~--~~~---~--~~
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: Computing discrete logarithm

2007-12-04 Thread David Joyner

Maybe printing the values makes it clearer?

sage: R = Integers(125)
sage: g = R.multiplicative_generator(); g
2
sage: b = g^3; b
8
sage: a = b^17; a
123
sage: a.log(b)
17

So, 123 = 8^(17) mod 125:

sage: R(123).log(8)
17
sage: R(123) == R(8)^(17)
True


On Dec 4, 2007 5:59 AM, Timothy Clemans <[EMAIL PROTECTED]> wrote:
>
> Hi I want to know how to compute discrete logarithms in Z_p, but I
> can't seem to understand the explanation on
> http://modular.math.washington.edu/sage/doc/html/const/node63.html
>
> I understand that 125 in "sage: r = Integers(125)" is m but what is 3
> and what is 17? Is 3 a or is it b?
>
> When I tried to figure it out:
> "print Mod(3^17,125)
> print Mod(17^17,125)"
> I got
> "38
> 52"
> neither of which is 17 nor 3.
>
> Could someone please give me a clear example of computing a discrete
> logarithm in Z_p. Like maybe using b = 25, a = 2, and m = 23.
>
> It would be nice if there was a function in Sage for computing this
> since this kind of computation is the basis for analysis of
> Diffie-Hellman which a lot of people learn about.
>
> >
>

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

2007-12-04 Thread fwc



On Dec 4, 2:30 am, "Mike Hansen" <[EMAIL PROTECTED]> wrote:

> > 1)  Taylor series of a rational function.
>
> > This works:
> > sage: cos(x).taylor(x,0,2)
>
> > This doesn't:
> > sage: x/(1+x).taylor(x,0,2)
>
> > This is very confusing:

> This is due to the fact that '.' binds tighter than '/'.  For example,
> sage: x/(1+x).taylor(x,0,2)
> x/(x + 1)
> sage: x/((1+x).taylor(x,0,2))
> x/(x + 1)
> sage: (x/(1+x)).taylor(x,0,2)
> x - x^2
>
> In Sage, "(x/(1+x))" creates an object and the you call the taylor()
> method on that object.

Mathematica has the advantage that Series creates a truncated series
object rather than a polynomial.  Thus it doesn't matter whether the
division is done before or after:

sage: mathematica("x/Series[1+x, {x, 0, 1}]")
SeriesData[x, 0, {1, -1}, 1, 3, 1]
sage: mathematica("Series[x/(1+x), {x, 0, 2}]")
SeriesData[x, 0, {1, -1}, 1, 3, 1]

(Of course, the output is displayed more readably as "x - x^2 +
O[x]^3" in a Mathematica notebook.)  It would be nice if Sage could do
the equivalent.  Perhaps it can, but I haven't found out how.

Francis


--~--~-~--~~~---~--~~
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] Upgrade ate my worksheets

2007-12-04 Thread fwc

I successfully upgraded 2.8.14 -> 2.8.15 [Mac OS X 10.4.11, 2 GHz
Intel Core 2 Duo, 1 GB].

But my worksheets do not appear when I do  sage -notebook

I'm told that "The notebook files are stored in:  ~/.sage/
sage_notebook", but there's no trace there.  However they do seem to
be in  ~/sage_notebook .  I tried using the "upload" link in the sage
in SAGE:Worksheet List and browsing into  ~/sage_notebook, but the
only human readable files I could find (which do indeed contain the
old worksheet details I want) were, for example, ~/sage_notebook/
worksheets/admin/3/worksheet.txt .  However they all gave rise to

Error uploading worksheet 'Error decompressing saved worksheet.'.

I'm still not sure how to recover my old worksheets.  Should I be
looking elsewhere?

--

If the files are now going to be in  ~/.sage/sage_notebook , browsing
there from a Mac is going to be problematic, because Finder windows
ignore .* files/directories

Francis

--~--~-~--~~~---~--~~
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] Computing discrete logarithm

2007-12-04 Thread Timothy Clemans

Hi I want to know how to compute discrete logarithms in Z_p, but I
can't seem to understand the explanation on
http://modular.math.washington.edu/sage/doc/html/const/node63.html

I understand that 125 in "sage: r = Integers(125)" is m but what is 3
and what is 17? Is 3 a or is it b?

When I tried to figure it out:
"print Mod(3^17,125)
print Mod(17^17,125)"
I got
"38
52"
neither of which is 17 nor 3.

Could someone please give me a clear example of computing a discrete
logarithm in Z_p. Like maybe using b = 25, a = 2, and m = 23.

It would be nice if there was a function in Sage for computing this
since this kind of computation is the basis for analysis of
Diffie-Hellman which a lot of people learn about.

--~--~-~--~~~---~--~~
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: SAGE-2.8.15!

2007-12-04 Thread Andrzej Giniewicz

WooHoo :)

that's great news... I'm just upgrading it to look around asap... :)

btw, is it really true that R interface is so-almost-ready that it
could be included in release planned for end of week so in few days? I
would be quite amazed to see it so soon :)

regards,
Andrzej Giniewicz.

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