[sage-support] Does the digits method have an inverse?

2008-10-21 Thread Jason Merrill
sage: 1492.digits(10) [2, 9, 4, 1] Now is there an easy way to take this list and get back the integer 1492? Regards, JM --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[sage-support] Re: bug in notebook display typesetting fractional exponents

2008-09-30 Thread Jason Merrill
On Sep 30, 10:24 pm, Jim Clark <[EMAIL PROTECTED]> wrote: > Thank you Jason! I have looked through the documentation for vector   > analysis examples, without success. I was not aware of the gradient()   > function. > > HOWEVER, the bug that I came upon in my initial effort is real. I don't think

[sage-support] Re: bug in notebook display typesetting fractional exponents

2008-09-30 Thread Jason Merrill
On Sep 30, 6:26 pm, Jim Clark <[EMAIL PROTECTED]> wrote: > Hi there, > > I found a teeny bug in sage's rendering of fractional exponents (3/2   > in this case) in notebook's output: > >  sagebug.tiff > 54KViewDownload Hi Jim, Try replacing %delW with %latex(delW). Or just do sage: show(W.gradi

[sage-support] Re: Bug in plot?

2008-09-26 Thread Jason Merrill
On Sep 27, 2:02 am, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > The patch at 4201 adds the features and the documentation back :-) > Thanks for keeping an eye open. Likewise :-). Guess if I had read your ticket, I would have seen that you were already on top of it. JM --~--~-~--~~---

[sage-support] Re: Bug in plot?

2008-09-26 Thread Jason Merrill
On Sep 26, 4:07 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > Hi Jason, > > On Fri, Sep 26, 2008 at 9:05 AM, Jason Bandlow <[EMAIL PROTECTED]> wrote: > > A student of mine noticed the following and it looks like a bug to me > > (at least with the documentation). > > This was a regression caused b

[sage-support] Re: Storing results of solve() function

2008-09-23 Thread Jason Merrill
On Sep 23, 3:58 pm, Andy <[EMAIL PROTECTED]> wrote: > I am programming for a project in sage and I want to make use of the > solve() function.  However, I noticed that solve() does not return the > value of the solved variable but only a statement instead. > > For instance, if I wanted to do solve

[sage-support] Re: operations with matrices

2008-09-23 Thread Jason Merrill
> John Cremona > > 2008/9/23 aniura <[EMAIL PROTECTED]>: > > > > > hi, > > > I wanted to know if there is a way to work in Sage with arrays of > > matrices or something similar (something like a[i,j,k], so that > > a[i,:,:], a[:,j,:] and a[:,:,k] are all matrices. I tried to use a > > list of matr

[sage-support] Re: Is there a way to access the unsimplified form of a symbolic expression?

2008-09-16 Thread Jason Merrill
On Sep 17, 12:31 am, Jason Merrill <[EMAIL PROTECTED]> wrote: > On Sep 16, 11:45 pm, Jason Merrill <[EMAIL PROTECTED]> wrote: > > > Can I ever get sage to print something like > > > sage: (x - x).some_devious_trick() > > x - x > > Just wanted to d

[sage-support] Re: Is there a way to access the unsimplified form of a symbolic expression?

2008-09-16 Thread Jason Merrill
On Sep 16, 11:45 pm, Jason Merrill <[EMAIL PROTECTED]> wrote: > Can I ever get sage to print something like > > sage: (x - x).some_devious_trick() > x - x > > If there is a way to do this, or if there could be a way to do this > that wouldn't foul everything up,

[sage-support] Is there a way to access the unsimplified form of a symbolic expression?

2008-09-16 Thread Jason Merrill
The documentation for simplify explains: Expressions always print simplified; a simplified expression is distinguished because the way it prints agrees with its underlyilng representation. sage: x - x 0 sage: type(x - x) sage: type(simplify(x - x)) So until hit with an explicit simplify comma

[sage-support] Re: displaying "diff" as a partial/total derivative

2008-09-16 Thread Jason Merrill
This is http://trac.sagemath.org/sage_trac/ticket/3717. Feeling motivated to fix it? JM On Sep 16, 6:56 pm, Jason Grout <[EMAIL PROTECTED]> wrote: > I'm writing an @interact to solve simple 2nd order differential > equations and plot solutions.  In it, I'd like to typeset the formula: > > show(

[sage-support] Re: Accessing spline like function?

2008-09-13 Thread Jason Merrill
On Sep 13, 5:16 pm, Sand Wraith <[EMAIL PROTECTED]> wrote: > Hello, > > tell please, how to access spline like function? for example i have: > > p=list(); > p.append([1,1]); > p.append([2,1.5]); > p.append([3,2]); > p.append([4,0]); > s=spline(p) > > and i can get value of s in any point: s(1) or

[sage-support] Re: Integral problems

2008-09-12 Thread Jason Merrill
On Sep 12, 4:48 pm, Sand Wraith <[EMAIL PROTECTED]> wrote: > Hi all! Help please again :-) > > here is worksheet describes my problem: > > http://75.75.6.176/home/pub/8/ > > so, at the last stem i have wrong result: 0 instead of 2/3. > > what i am doing wrong? It looks like there are a few proble

[sage-support] Re: PIL and jpeg on OS X workaround

2008-09-12 Thread Jason Merrill
On Sep 12, 2:34 pm, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On Sep 10, 7:11 pm, Jason Merrill <[EMAIL PROTECTED]> wrote: > > Hi Jason, > > > I had been having trouble for a while figuring out how to load jpgs > > into a usable form on OS X.  The o

[sage-support] Re: can't plot a Bessel function

2008-09-11 Thread Jason Merrill
On Sep 11, 10:32 am, Jason Merrill <[EMAIL PROTECTED]> wrote: > > We should think hard about making things easy to partially evaluate. > Why not have all the special functions behave like polylog? > Furthermore, it would ideally be easy for a user to define their own > funct

[sage-support] Re: can't plot a Bessel function

2008-09-11 Thread Jason Merrill
On Sep 11, 9:07 am, "John Cremona" <[EMAIL PROTECTED]> wrote: > This works: > > plot(lambda t:bessel_J(1, t), (1, 10)) > > so (1) a one-variable function is reequired, and the lambda > construction creates such a function from the2-variable bessel_J, and > (2) the range is a tuple (xmin,xmax) . >

[sage-support] PIL and jpeg on OS X workaround

2008-09-10 Thread Jason Merrill
I had been having trouble for a while figuring out how to load jpgs into a usable form on OS X. The optional PIL spkg that gets installed through sage -i PIL-1.1.5.spkg would throw an IOError when I tried to load in a jpeg, complaining that the jpeg decoder wasn't available. I found a work aroun

[sage-support] Re: Wrong plotting!

2008-09-08 Thread Jason Merrill
On Sep 8, 4:12 pm, Sand Wraith <[EMAIL PROTECTED]> wrote: > Hi all! > > I do not know - it is an bug, or my mistake. I am trying to plot sum > of a few same functions: > > This is my function: > B=10*sqrt( pi)/7; > b=pi/7; > c(f)=B*exp(-(b*f)^2); > plot(c(f),(f,-5,5)); > > in the output i see co

[sage-support] Re: Difference between a vector and a 1 by n matrix

2008-09-07 Thread Jason Merrill
On Sep 7, 6:30 am, "John Cremona" <[EMAIL PROTECTED]> wrote: > It should be lightly easier than it is to convert a vector of length n > to either an nx1 matrix or a 1xn matrix: > > sage: v = vector(srange(5)) > sage: v > (0, 1, 2, 3, 4) > sage: matrix(QQ,1,5,[v]) > [0 1 2 3 4] > sage: matrix(QQ,5,

[sage-support] Re: Difference between a vector and a 1 by n matrix

2008-09-06 Thread Jason Merrill
On Sep 6, 7:26 pm, Jason Merrill <[EMAIL PROTECTED]> wrote: > Is there a simple way to think of the difference between a vector with > n elements, and a 1 by n matrix in Sage.  When would I want to use one > instead of the other? > > sage: m = matrix([1,2,3,4,5]) >

[sage-support] Difference between a vector and a 1 by n matrix

2008-09-06 Thread Jason Merrill
Is there a simple way to think of the difference between a vector with n elements, and a 1 by n matrix in Sage. When would I want to use one instead of the other? sage: m = matrix([1,2,3,4,5]) sage: parent(m) Full MatrixSpace of 1 by 5 dense matrices over Integer Ring sage: v = vector([1,2,3,4,

[sage-support] Re: if-statement with "infinity" or "NaN"

2008-09-04 Thread Jason Merrill
On Sep 4, 7:23 am, "John Cremona" <[EMAIL PROTECTED]> wrote: > 2008/9/4 David Philp <[EMAIL PROTECTED]>: > > I think this is better: > > http://sagemath.org/doc/ref/module-sage.rings.real-mpfr.html > > since RDF (double precision reals) is deprecated.  Again, look for > is_infinity. > > John Crem

[sage-support] Re: testing for equality

2008-09-02 Thread Jason Merrill
Be careful with bool. It will return False for equations that may be true. Simple example: sage: bool(x == 0) False I believe in some cases it will return False for equations that are actually True if sage doesn't know how to make the necessary simplifications. But if it returns True, you can

[sage-support] Re: Inert Integrals and Derivatives?

2008-08-30 Thread Jason Merrill
On Aug 30, 7:46 pm, Robert Dodier <[EMAIL PROTECTED]> wrote: > From the direction this discussion has taken I'm guessing that > nobody here is aware that selective evaluation is trivial in Lisp, > and Maxima. In both cases a single quote marks stuff that > isn't evaluated. Maxima further marks a d

[sage-support] Re: Inert Integrals and Derivatives?

2008-08-29 Thread Jason Merrill
On Aug 29, 3:07 am, Burcin Erocal <[EMAIL PROTECTED]> wrote: > On Thu, 28 Aug 2008 15:28:03 -0400 > > > > Tim Lahey <[EMAIL PROTECTED]> wrote: > > Hi, > > > Maple has a really useful feature of inert integrals > > and derivatives. Basically, the integrals and derivatives > > show up in the equatio

[sage-support] Re: Double Factorial

2008-08-26 Thread Jason Merrill
On Aug 26, 9:37 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On Tue, 26 Aug 2008, William Stein wrote: > > > On Tue, Aug 26, 2008 at 5:34 PM, Jason Merrill <[EMAIL PROTECTED]> wrote: > >> Does Sage have a double factorial somewhere that I'm missing.  If

[sage-support] Double Factorial

2008-08-26 Thread Jason Merrill
I couldn't find a double factorial function in sage. That is, n!! == n*(n - 2)*(n - 4)... Does Sage have a double factorial somewhere that I'm missing. If not, could it? Regards, JM --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@google

[sage-support] Re: square of an inequality

2008-08-24 Thread Jason Merrill
On Aug 24, 5:43 pm, Stan Schymanski <[EMAIL PROTECTED]> wrote: > I think it would be very nice to include a solve algorithm for > inequalities. To my knowledge, Mathematica does not do this, either. > Or at least, I did not find out how to do it in Mathematica after 4 > years of use. In Mathemati

[sage-support] Plotting jacobi function fails

2008-08-22 Thread Jason Merrill
Plotting jacobi("sn",x,2) doesn't work, although plotting jacobi("sn",x,1) does work. sage: parent(plot(jacobi("sn",x,1),(x,-3,3))) sage: parent(plot(jacobi("sn",x,2),(x,-3,3))) Callable function ring with arguments (x,) Regards, JM --~--~-~--~~~---~--~~ To pos

[sage-support] Re: Adding the method function for the class integer.

2008-08-20 Thread Jason Merrill
On Aug 20, 4:23 pm, Roger <[EMAIL PROTECTED]> wrote: > What is the difference between: > > sage: derivative(3*x,x)(2) > > which gives an error, and > > sage: f(x) = 3*x > sage: derivative(f,x)(2) > > which returns 3, and > > sage: f(x) = 3*x > sage: derivative(f(x),x)(2) > > which also gives an er

[sage-support] Re: parametric_plot and constants? multiple plots?

2008-08-19 Thread Jason Merrill
On Aug 19, 8:23 pm, Mike Witt <[EMAIL PROTECTED]> wrote: > As long as I'm here, a 2nd question. Using the command line interface, > is there any way I can spawn more than one window to render different > plots in them at the same time? (Of, if Ticket #2380 is likely to be > worked on in the nea

[sage-support] Most links to worksheets at sagenb.org show up blank

2008-08-19 Thread Jason Merrill
Every time I follow a link to a published worksheet at sagenb.org, I just see an empty worksheet. The latest example is https://www.sagenb.org/home/pub/1745/ which I followed from trac #2549 http://trac.sagemath.org/sage_trac/ticket/2549 I can provide more examples on request. Why are so man

[sage-support] Re: Loading a "Windows" file?

2008-08-19 Thread Jason Merrill
On Aug 19, 3:15 pm, pong <[EMAIL PROTECTED]> wrote: > I have the exact same problem. > > 1) I'm not sure what Data...-> Upload file means. I tried that in a > notebook session as suggested but got a syntax error. I also try > Upload? but no information is available. Data is one of the select boxe