[sage-support] Re: axes labels in plot3d

2008-10-03 Thread Erik Lane

If you right click on the 3d plot after it is made you can sort of add
in the axes. I say 'sort of' because they have never actually lined up
right where they are supposed to be. They go through the middle(ish)
of the box, but the x-y plane is displaced (for me) in the positive z
direction. You can look for yourself - right click, then click on
style, and check the 'axes' box.

So it's not perfect, but for me is quite a help at keeping oriented
with what is where when I'm looking at it. Though I'm not sure if it's
good enough for you needs.

Erik

On Thu, Oct 2, 2008 at 9:11 PM, William Stein [EMAIL PROTECTED] wrote:

 On Thu, Oct 2, 2008 at 8:05 PM, Diamantis [EMAIL PROTECTED] wrote:

 Hi,
 I recently installed sage (Ubuntu 8.04) as I think I am going to need
 it for my PhD work. I was trying to make a 3d plot of a function, in
 order to better understand a model, but what confuses me is that I
 cannot find how to add labels on the axes. Any ideas?
 Thank you very much.

 I think unfortunately nobody implemented that yet.  You can work
 around this by using the text3d command to explicitly place
 a label, like this:

 sage: var('x,y');
 sage: plot3d(sin(x*y),(x,-1,1),(y,-2,2)) + text3d(X Axis,(0,-2,-1))

 (When this feature is implemented, it will in fact be implemented by
 just calling text3d.)  I hope somebody will implement it; I doubt
 it would be difficult.

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



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread Ondrej Certik

On Thu, Oct 2, 2008 at 6:43 PM, William Stein [EMAIL PROTECTED] wrote:

 On Thu, Oct 2, 2008 at 9:31 AM, jdmuys [EMAIL PROTECTED] wrote:

 Hi,

 I am a total newcomer, and here is very simple high-school level
 question for which I could not find an answer in several hours of
 searching:

 How can I use Sage to simplify ratios involving complex numbers?

 By simplify, I mean, to put into the canonical form a+b*i.

 For a very simple example: simplifying x=1/(1+i) would yield (1/2 - i/
 2)

 Note: this is simple to do by hand: multiply both numerator and
 denominator by the conjugate of the denominator. For my example, this
 leads to:

 x= (1-i)/[(1+i)(1-i)]
 x = (1-i)/[1^2-i^2]
 x = (1-i)/[1+1]
 x = (1-i)/2
 x = 1/2 -i/2

 I tried quite a number of things, none of which worked.

 Thanks, and sorry if my question is easy (well actually, I hope it's
 easy ;-)


 You could get the real and imaginary parts, as follows:

 sage: a = (1-I)/(1 + I)
 sage: a.real() + I*a.imag()
 -1*I

 If you're coefficients are all rational numbers, you could
 alternatively define I to be the generator for the ring QQ[sqrt(-1)],
 as follows, and all such expressions will automatically
 be simplified the moment you type them in:

 sage: I = QQ[sqrt(-1)].gen()
 sage: 1/1 + I
 I + 1
 sage: 1/(1 + I)
 -1/2*I + 1/2
 sage: (1-I)/(1 + I)
 -I

 Note that expressions like sqrt(2)*I will no longer work
 with this new version of I.  To get back the old I, you
 can do
 sage: reset('I')

Or through some package, e.g. sometimes sympy's simplification works well:

sage: a = (1-I)/(1 + I)
sage: import sympy
sysage: sympy.simplify(a)
-I
sage: SR(sympy.simplify(a))
-1*I

The SR() converts the expression back from a sympy expression to a
Sage expression.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread jdmuys

Ok thanks to you both. Your answers show both Sage's flexibility and
its room for improvement. The QQ[sqrt(-1)] idea is especially
baffling, and completely out of reach of the target audience (high
school).

As a newbie with maybe half a day of Sage experience, none of the
answers was either easy to guess, or discoverable in the available
resources.

Cheers,

Jean-Denis

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread Ondrej Certik

On Fri, Oct 3, 2008 at 8:58 AM, jdmuys [EMAIL PROTECTED] wrote:

 Ok thanks to you both. Your answers show both Sage's flexibility and
 its room for improvement. The QQ[sqrt(-1)] idea is especially
 baffling, and completely out of reach of the target audience (high
 school).

 As a newbie with maybe half a day of Sage experience, none of the
 answers was either easy to guess, or discoverable in the available
 resources.

Indeed, I completely agree that QQ is completely baffling, for me
definitely. There is some documentation here:

http://www.sagemath.org/doc/tut/node22.html

But the best thing is to do QQ? in sage. Sage has very good docstrings.

Maybe, if you are interested, it'd be awesome if you could contribute
to Sage docs. Sign it to sage-devel, there are many people who would
help with it.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread Robert Bradshaw

On Oct 2, 2008, at 10:43 PM, Ondrej Certik wrote:

 On Thu, Oct 2, 2008 at 6:43 PM, William Stein [EMAIL PROTECTED]  
 wrote:

 On Thu, Oct 2, 2008 at 9:31 AM, jdmuys [EMAIL PROTECTED] wrote:

 Hi,

 I am a total newcomer, and here is very simple high-school level
 question for which I could not find an answer in several hours of
 searching:

 How can I use Sage to simplify ratios involving complex numbers?

 By simplify, I mean, to put into the canonical form a+b*i.

 For a very simple example: simplifying x=1/(1+i) would yield (1/2  
 - i/
 2)

 Note: this is simple to do by hand: multiply both numerator and
 denominator by the conjugate of the denominator. For my example,  
 this
 leads to:

 x= (1-i)/[(1+i)(1-i)]
 x = (1-i)/[1^2-i^2]
 x = (1-i)/[1+1]
 x = (1-i)/2
 x = 1/2 -i/2

 I tried quite a number of things, none of which worked.

 Thanks, and sorry if my question is easy (well actually, I hope it's
 easy ;-)


 You could get the real and imaginary parts, as follows:

 sage: a = (1-I)/(1 + I)
 sage: a.real() + I*a.imag()
 -1*I

 If you're coefficients are all rational numbers, you could
 alternatively define I to be the generator for the ring QQ[sqrt 
 (-1)],
 as follows, and all such expressions will automatically
 be simplified the moment you type them in:

 sage: I = QQ[sqrt(-1)].gen()
 sage: 1/1 + I
 I + 1
 sage: 1/(1 + I)
 -1/2*I + 1/2
 sage: (1-I)/(1 + I)
 -I

 Note that expressions like sqrt(2)*I will no longer work
 with this new version of I.  To get back the old I, you
 can do
 sage: reset('I')

 Or through some package, e.g. sometimes sympy's simplification  
 works well:

 sage: a = (1-I)/(1 + I)
 sage: import sympy
 sysage: sympy.simplify(a)
 -I
 sage: SR(sympy.simplify(a))
 -1*I

 The SR() converts the expression back from a sympy expression to a
 Sage expression.

It's really sad that we don't have a more intuitive way to do this.  
There's a maxima command (rectcoords or something like that) but it's  
not obvious how to invoke it directly on the SR object.

I've actually been working on a patch for coercion that will allow  
number fields to come with specified embeddings, in which case we  
will let I be in QQ[sqrt(-1)] (or even perhaps ZZ[sqrt(-1)]), but  
with a specified embedding into CC (and by extension SR) so that  
stuff like I + sqrt(2) works as expected, but (1-I)/(1+I) simplifies  
automatically (and fast).

- Robert





--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-03 Thread Ines

Hi !
I tried to insatll a last version of sage : sage-3.1.2.tar with no
sucess. How can I send you the insall.log file ?

Ines.


On 30 sep, 16:54, mabshoff [EMAIL PROTECTED]
dortmund.de wrote:
 Ines Abdeljaoued-TEJ wrote:
  Hi !

 Hi Ines,

 please don't take discussions off list.

 SNIP

  There is a file call install.log in the Sage base directory. Can you
  upload it somewhere and post a link?

  I'll try to upload the install.log, but this will take a while (I'm not in 
  the
  office until friday).

 Ok.

  There are also x86 and x86-64 binaries for OpenSuSE 10.2 I believe, so
  you might want to give them a try.

  Should Iinstall OpenSuse10.2 in place of suse 10.1 ?
  Thanks, Ines.

 It is worth a try, but it might not work. I don't know a reason why
 compiling Sage on OpenSuSE 10.1 should not work, but I guess we will
 find out.

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



[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-03 Thread mabshoff



On Oct 3, 5:30 am, Ines [EMAIL PROTECTED] wrote:
 Hi !
 I tried to insatll a last version of sage : sage-3.1.2.tar with no
 sucess. How can I send you the insall.log file ?

 Ines.

Hi Ines,

please send it compressed to me off list per email.

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



[sage-support] Re: is it possible to show() a variable with it's name = in front of it

2008-10-03 Thread Neal Holtz

Or, if you don't like constantly having to repeat the variable name,
something like:

sage: def vshow(_v):
: print '%s = %s\n' % (_v,latex(globals()[_v]))
:
sage: var('q')
q
sage: a = 3*q/2
sage: vshow('a')
a = \frac{{3 q}}{2}

This is far from an ideal solution, as if you call it
from within another function, you may have to change
'globals()' to 'locals()' or get even a bit more complex
by trying locals first, then globals ...

Samuel Gaehwiler wrote:
 hi,

 I use sage (in notebook mode) for basic calculations on a daily basis.
 I also like to print out my calculations and hand it in with my
 exercise.
 Since the people who correct them here at the ETH university in Z�rich
 are not familiar with sage, I would like to print every result with
 the variable-name in front of it.

 i.e.
 sage a_2 = 2/3+1
 sage show(a_2)

   a_2 = 5/3  (nicly formated, as if typsetted in latex)

 is this somehow possible? (is there an argument for show() I've
 missed, or maybe a little phyton script?)

 best regards,
 Samuel
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread William Stein

On Fri, Oct 3, 2008 at 2:36 AM, Robert Bradshaw
[EMAIL PROTECTED] wrote:

 On Oct 2, 2008, at 10:43 PM, Ondrej Certik wrote:

 On Thu, Oct 2, 2008 at 6:43 PM, William Stein [EMAIL PROTECTED]
 wrote:

 On Thu, Oct 2, 2008 at 9:31 AM, jdmuys [EMAIL PROTECTED] wrote:

 Hi,

 I am a total newcomer, and here is very simple high-school level
 question for which I could not find an answer in several hours of
 searching:

 How can I use Sage to simplify ratios involving complex numbers?

 By simplify, I mean, to put into the canonical form a+b*i.

 For a very simple example: simplifying x=1/(1+i) would yield (1/2
 - i/
 2)

 Note: this is simple to do by hand: multiply both numerator and
 denominator by the conjugate of the denominator. For my example,
 this
 leads to:

 x= (1-i)/[(1+i)(1-i)]
 x = (1-i)/[1^2-i^2]
 x = (1-i)/[1+1]
 x = (1-i)/2
 x = 1/2 -i/2

 I tried quite a number of things, none of which worked.

 Thanks, and sorry if my question is easy (well actually, I hope it's
 easy ;-)


 You could get the real and imaginary parts, as follows:

 sage: a = (1-I)/(1 + I)
 sage: a.real() + I*a.imag()
 -1*I

 If you're coefficients are all rational numbers, you could
 alternatively define I to be the generator for the ring QQ[sqrt
 (-1)],
 as follows, and all such expressions will automatically
 be simplified the moment you type them in:

 sage: I = QQ[sqrt(-1)].gen()
 sage: 1/1 + I
 I + 1
 sage: 1/(1 + I)
 -1/2*I + 1/2
 sage: (1-I)/(1 + I)
 -I

 Note that expressions like sqrt(2)*I will no longer work
 with this new version of I.  To get back the old I, you
 can do
 sage: reset('I')

 Or through some package, e.g. sometimes sympy's simplification
 works well:

 sage: a = (1-I)/(1 + I)
 sage: import sympy
 sysage: sympy.simplify(a)
 -I
 sage: SR(sympy.simplify(a))
 -1*I

 The SR() converts the expression back from a sympy expression to a
 Sage expression.

 It's really sad that we don't have a more intuitive way to do this.
 There's a maxima command (rectcoords or something like that) but it's
 not obvious how to invoke it directly on the SR object.

 I've actually been working on a patch for coercion that will allow
 number fields to come with specified embeddings, in which case we
 will let I be in QQ[sqrt(-1)] (or even perhaps ZZ[sqrt(-1)]), but
 with a specified embedding into CC (and by extension SR) so that

I'm worried that won't work, since CC is 53-bit precision floats, so
by extension SR means you'll end up with 1.0*I rather than I.

For the record, Mathematica just automatically simplify things like 1/(1+I),
as does Maple, and Sage should too since since ginsh (ginac's shell) does
simplify 1/(1+I) too (see below):


[EMAIL PROTECTED]:~$ math
Mathematica 6.0 for Linux x86 (64-bit)
Copyright 1988-2007 Wolfram Research, Inc.

In[1]:= I^2
Out[1]= -1

In[2]:= 1/(1+I)
1   I
Out[2]= - - -
2   2

---

In Maple:

 1/(1+I);
  1/2 - 1/2 I

In Ginac:
 [EMAIL PROTECTED]:~$ /usr/bin/ginsh
ginsh - GiNaC Interactive Shell (ginac V1.3.5)
  __,  ___  Copyright (C) 1999-2006 Johannes Gutenberg University Mainz,
 (__) *   | Germany.  This is free software with ABSOLUTELY NO WARRANTY.
  ._) i N a C | You are welcome to redistribute it under certain conditions.
-' For details type `warranty;'.

Type ?? for a list of help topics.
 I^2;
-1
 1/(1+I);
1/2-1/2*I




The upshot of all this is that Maxima (which Sage currently uses)
is causing this confusion, since it has a different convention than
all the other systems:

 [EMAIL PROTECTED]:~$ maxima
Maxima 5.16.2 http://maxima.sourceforge.net
Using Lisp CLISP 2.46 (2008-07-02)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
...
(%i2) %i^2;
(%o2) - 1
(%i3) 1/(1+%i);
  1
(%o3)   --
%i + 1


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



[sage-support] Re: is it possible to show() a variable with it's name = in front of it

2008-10-03 Thread Georg

Hi samuel,
may you write yourself a wrapper which similar to this:

 def ashow(**args):
... for key in args:
... print key,'=',args[key]
...
 c = 345.45
 ashow(c=c)
c = 345.45

instead of print key,'=',args[key]
one could write
return str(key) + '=' + str(args[key])

the following unfortunately does not work as one might expect at the
very first sight:

 def bshow(a):
... ashow(a=a)
...
 bshow(c)
a = 345.45

Georg


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread Robert Bradshaw

On Oct 3, 2008, at 11:40 AM, William Stein wrote:

 On Fri, Oct 3, 2008 at 2:36 AM, Robert Bradshaw
 [EMAIL PROTECTED] wrote:

 On Oct 2, 2008, at 10:43 PM, Ondrej Certik wrote:

 On Thu, Oct 2, 2008 at 6:43 PM, William Stein [EMAIL PROTECTED]
 wrote:

 On Thu, Oct 2, 2008 at 9:31 AM, jdmuys [EMAIL PROTECTED] wrote:

 Hi,

 I am a total newcomer, and here is very simple high-school level
 question for which I could not find an answer in several hours of
 searching:

 How can I use Sage to simplify ratios involving complex numbers?

 By simplify, I mean, to put into the canonical form a+b*i.

 For a very simple example: simplifying x=1/(1+i) would yield (1/2
 - i/
 2)

 Note: this is simple to do by hand: multiply both numerator and
 denominator by the conjugate of the denominator. For my example,
 this
 leads to:

 x= (1-i)/[(1+i)(1-i)]
 x = (1-i)/[1^2-i^2]
 x = (1-i)/[1+1]
 x = (1-i)/2
 x = 1/2 -i/2

 I tried quite a number of things, none of which worked.

 Thanks, and sorry if my question is easy (well actually, I hope  
 it's
 easy ;-)


 You could get the real and imaginary parts, as follows:

 sage: a = (1-I)/(1 + I)
 sage: a.real() + I*a.imag()
 -1*I

 If you're coefficients are all rational numbers, you could
 alternatively define I to be the generator for the ring QQ[sqrt
 (-1)],
 as follows, and all such expressions will automatically
 be simplified the moment you type them in:

 sage: I = QQ[sqrt(-1)].gen()
 sage: 1/1 + I
 I + 1
 sage: 1/(1 + I)
 -1/2*I + 1/2
 sage: (1-I)/(1 + I)
 -I

 Note that expressions like sqrt(2)*I will no longer work
 with this new version of I.  To get back the old I, you
 can do
 sage: reset('I')

 Or through some package, e.g. sometimes sympy's simplification
 works well:

 sage: a = (1-I)/(1 + I)
 sage: import sympy
 sysage: sympy.simplify(a)
 -I
 sage: SR(sympy.simplify(a))
 -1*I

 The SR() converts the expression back from a sympy expression to a
 Sage expression.

 It's really sad that we don't have a more intuitive way to do this.
 There's a maxima command (rectcoords or something like that) but it's
 not obvious how to invoke it directly on the SR object.

 I've actually been working on a patch for coercion that will allow
 number fields to come with specified embeddings, in which case we
 will let I be in QQ[sqrt(-1)] (or even perhaps ZZ[sqrt(-1)]), but
 with a specified embedding into CC (and by extension SR) so that

 I'm worried that won't work, since CC is 53-bit precision floats, so
 by extension SR means you'll end up with 1.0*I rather than I.

I just meant in the sense that fixing an embedding into CC fixes the  
embedding into SR, QQbar, ComplexField(1000), etc. The embedding will  
actually be into the complex lazy field.

 For the record, Mathematica just automatically simplify things like  
 1/(1+I),
 as does Maple, and Sage should too since since ginsh (ginac's  
 shell) does
 simplify 1/(1+I) too (see below):

Good, all the more reason that sage *should* (and will).

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread William Stein

On Fri, Oct 3, 2008 at 12:10 PM, Robert Bradshaw
[EMAIL PROTECTED] wrote:

 On Oct 3, 2008, at 12:05 PM, William Stein wrote:


 I'm worried that won't work, since CC is 53-bit precision floats, so
 by extension SR means you'll end up with 1.0*I rather than I.

 I just meant in the sense that fixing an embedding into CC fixes the
 embedding into SR, QQbar, ComplexField(1000), etc. The embedding will
 actually be into the complex lazy field.

 Can you write a paragraph or two about these new lazy
 fields you've been implementing?

 Yes, see the docstrings at http://trac.sagemath.org/sage_trac/ticket/
 4226 .


Thanks, that was helpful.  I noticed that the docstring for
   cdef class RealLazyField_class(LazyField)
has some tex markup, but is  instead of r, which will
cause trouble when this gets included in the reference
manual...

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



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread Robert Bradshaw

On Oct 3, 2008, at 12:05 PM, William Stein wrote:


 I'm worried that won't work, since CC is 53-bit precision floats, so
 by extension SR means you'll end up with 1.0*I rather than I.

 I just meant in the sense that fixing an embedding into CC fixes the
 embedding into SR, QQbar, ComplexField(1000), etc. The embedding will
 actually be into the complex lazy field.

 Can you write a paragraph or two about these new lazy
 fields you've been implementing?

Yes, see the docstrings at http://trac.sagemath.org/sage_trac/ticket/ 
4226 .

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: is it possible to show() a variable with it's name = in front of it

2008-10-03 Thread Jason Grout

Samuel Gaehwiler wrote:
 hi,
 
 I use sage (in notebook mode) for basic calculations on a daily basis.
 I also like to print out my calculations and hand it in with my
 exercise.
 Since the people who correct them here at the ETH university in Zürich
 are not familiar with sage, I would like to print every result with
 the variable-name in front of it.
 
 i.e.
 sage a_2 = 2/3+1
 sage show(a_2)
 
   a_2 = 5/3  (nicly formated, as if typsetted in latex)
 
 is this somehow possible? (is there an argument for show() I've
 missed, or maybe a little phyton script?)

I guess I should add that I don't think the exact syntax you have will 
work.  Once a_2 is passed to the show function, I don't think the show 
function knows where it came from, i.e., the show function has access to 
the *value* of a_2, but doesn't know what variable name was actually passed.

The other solutions had the variable name passed to the function as a 
string, which, of course, would be different because there you are 
passing in a string, the name of the variable.

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: How to simplify complex ratios, eg 1/(1+i)

2008-10-03 Thread William Stein

 I'm worried that won't work, since CC is 53-bit precision floats, so
 by extension SR means you'll end up with 1.0*I rather than I.

 I just meant in the sense that fixing an embedding into CC fixes the
 embedding into SR, QQbar, ComplexField(1000), etc. The embedding will
 actually be into the complex lazy field.

Can you write a paragraph or two about these new lazy
fields you've been implementing?

William

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



[sage-support] how to auto evaluate blocks with %html (sage notebook)

2008-10-03 Thread [EMAIL PROTECTED]

Hi, it would appear that #auto is incompatible with %html.  Is this
working as intended, or is there another way?  If I don't use %html,
anything I write doesn't word-wrap (word wrapping is what I want).
Elsewhere, William wrote that:

 If word wrapped, if you click to the left of the
output, it will toggle between show, word wrap off, hide.  The
state
for individual cells should be remembered.  

This is also documented on the help page.  Unfortunately for me,
clicking in this way only seems to toggle between hidden output or
shown  output, with no effects on word wrap.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] is it possible to show() a variable with it's name = in front of it

2008-10-03 Thread Samuel Gaehwiler

hi,

I use sage (in notebook mode) for basic calculations on a daily basis.
I also like to print out my calculations and hand it in with my
exercise.
Since the people who correct them here at the ETH university in Zürich
are not familiar with sage, I would like to print every result with
the variable-name in front of it.

i.e.
sage a_2 = 2/3+1
sage show(a_2)

  a_2 = 5/3  (nicly formated, as if typsetted in latex)

is this somehow possible? (is there an argument for show() I've
missed, or maybe a little phyton script?)

best regards,
Samuel
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-03 Thread William Stein

On Fri, Oct 3, 2008 at 1:25 PM, Ines Abdeljaoued-TEJ [EMAIL PROTECTED] wrote:
 I'll be to the office tomorrow; do you understand french ?

You get an internal compiler error when installing the Cython
spkg.  You're using gcc version 4.1.0 (SUSE Linux) and the
error is copied below and is, in short internal compiler error.
This always indicates either a serious bug in your compiler
or your hardware is defective.

You should definitely upgrade to a newer version of GCC
and try building Sage again from scratch.

gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -fPIC
-I/home/essai/Desktop/SAGEmath/sage-3.1.2/local/include/python2.5 -c
/home/essai/Desktop/SAGEmath/sage-3.1.2/spkg/build/cython-0.9.8.1.1.p0/src/Cython/Plex/Scanners.c
-o 
build/temp.linux-i686-2.5/home/essai/Desktop/SAGEmath/sage-3.1.2/spkg/build/cython-0.9.8.1.1.p0/src/Cython/Plex/Scanners.o
/home/essai/Desktop/SAGEmath/sage-3.1.2/spkg/build/cython-0.9.8.1.1.p0/src/Cython/Plex/Scanners.c:
In function '__pyx_pf_6Cython_4Plex_8Scanners_7Scanner_scan_a_token':
/home/essai/Desktop/SAGEmath/sage-3.1.2/spkg/build/cython-0.9.8.1.1.p0/src/Cython/Plex/Scanners.c:817:
internal compiler error: in merge_alias_info, at tree-ssa-copy.c:235
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://www.suse.de/feedback for instructions.
error: command 'gcc' failed with exit status 1



 Thanks, Ines.
 Le Friday 03 October 2008 15:37:11 mabshoff, vous avez écrit :
 On Oct 3, 5:30 am, Ines [EMAIL PROTECTED] wrote:
  Hi !
  I tried to insatll a last version of sage : sage-3.1.2.tar with no
  sucess. How can I send you the insall.log file ?
 
  Ines.

 Hi Ines,

 please send it compressed to me off list per email.

 Cheers,

 Michael



 --
 Ines Abdeljaoued-TEJ

 Unite Algorithmes et Structures,
 Ecole Superieure de La Statistique et
 de l'Analyse de l'Information de Tunis,

 tel : (+216)70 839 440 Poste 226
 fax : (+216)70 838 170
 mel : [EMAIL PROTECTED]
 adr : 6 rue des metiers, la Charguia 2, 2036 Ariana, Tunisia.

 




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



[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-03 Thread mabshoff



On Oct 3, 3:29 pm, William Stein [EMAIL PROTECTED] wrote:
 On Fri, Oct 3, 2008 at 1:25 PM, Ines Abdeljaoued-TEJ [EMAIL PROTECTED] 
 wrote:
  I'll be to the office tomorrow; do you understand french ?

I suggested sending the install log *off list* since most people on
this list did not want to receive a large attachment they will never
look at.

 You get an internal compiler error when installing the Cython
 spkg.  You're using gcc version 4.1.0 (SUSE Linux) and the
 error is copied below and is, in short internal compiler error.
 This always indicates either a serious bug in your compiler
 or your hardware is defective.

That gcc is a know bad compiler for Sage (and many other software
packages) - see #3123 blacklist gcc version 4.1.0 (SUSE Linux)

 You should definitely upgrade to a newer version of GCC
 and try building Sage again from scratch.

There are upgrades for OpenSuSE's 10.1 gcc rpms. They might be hard to
get hold of since OpenSuSE 10.1 is no longer supported.

SNIP

Cheers,

Michael

 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://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://www.sagemath.org
-~--~~~~--~~--~--~---