[sage-support] Re: Test if a variable is numerical

2010-05-07 Thread Rolandb
Hi, Maybe this helps: a=[1,2.3] print isinstance(a,list) True a=67 print isinstance(a,Integer) True Roland On 7 mei, 23:49, Nathann Cohen wrote: > Thank you !!! :-) > > Would there be any way to do the same thing without having to import > RR in all of my functions, though ? It's really mainl

[sage-support] Re: Text() issue

2010-05-07 Thread Jason Grout
On 05/07/2010 05:11 PM, Walter Grandy wrote: Sage does not seem to tolerate carriage returns in text(). That is, it objects to multi-paragraph text. Is there a way to accommodate this kind of text? Can you show us exactly what you are trying to do? Note that you can make a string containing n

[sage-support] Text() issue

2010-05-07 Thread Walter Grandy
Sage does not seem to tolerate carriage returns in text(). That is, it objects to multi-paragraph text. Is there a way to accommodate this kind of text? Thanks, Tom az...@comcast.net -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send

Re: [sage-support] Test if a variable is numerical

2010-05-07 Thread Nathann Cohen
Thank you !!! :-) Would there be any way to do the same thing without having to import RR in all of my functions, though ? It's really mainly to distinguish numerical values from different types, so I thought there may be a Python way to do it ... Though it perfectly works like that ! :-) Nathann

Re: [sage-support] Test if a variable is numerical

2010-05-07 Thread Robert Bradshaw
Try doing x in RR - Robert On May 7, 2010, at 2:38 PM, Nathann Cohen wrote: Hello everybody !!! I am trying to find out how to check whether some Sage variable is numerical (let's say real, as opposed to None, False, {}, Set([]), etc..), but was not lucky on Google... ^^; Do you know the f

[sage-support] Test if a variable is numerical

2010-05-07 Thread Nathann Cohen
Hello everybody !!! I am trying to find out how to check whether some Sage variable is numerical (let's say real, as opposed to None, False, {}, Set([]), etc..), but was not lucky on Google... ^^; Do you know the function I am looking for ? :-) Thank youu !!! Nathann -- To post to this g

[sage-support] bug desolve ?

2010-05-07 Thread Guillaume
Hello, I want to solve f''/f=k with k in R sage: x=var('x') sage: f=function('f',x) sage: k=var('k') sage: desolve(diff(f(x),x,2)/f(x)==k^2+1,[f,x]) k1*e^(I*sqrt(-k^2 - 1)*x) + k2*e^(-I*sqrt(-k^2 - 1)*x) I put k^2+1 since sage would'nt solve even with assume(k>0) -- To post to this group, se

[sage-support] decomposition of fractional ideals (converting PARI to SAGE)

2010-05-07 Thread Chan-Ho
Hi All, This is a continuation of the question http://www.mail-archive.com/sage-support@googlegroups.com/msg16973.html I am trying to decompose a fractional ideal into primes in a number field (I use online SAGE.) I have a Number Field in a2 with defining polynomial x^6 - 15*x^5 - 514*x^4 + 5312

Re: [sage-support] Racional coercion of very small decimal numbers.

2010-05-07 Thread Mike Hansen
On Fri, May 7, 2010 at 10:18 AM, Rodrigo wrote: > I would expect both results to be the same. Am I missing something? This is due to the way floating point numbers are stored. In particular, sage: a = 6.62606896 sage: b = 66.2606896 sage: a.exact_rational() * 10 == b.exact_rational() False See

Re: [sage-support] Re: converting strings to latex

2010-05-07 Thread Georg Damm
Am Freitag, 7. Mai 2010, um 05:54:50 schrieb ablondin: > Ok, I think I understand your problem. I had something similar > before. The problem is that the object returned by the function > sarrus is a 'str', > which sagetex format so that it replaces every underscore, etc. > with \_ to make it work

[sage-support] edo

2010-05-07 Thread Guillaume
Hello, I have got some problems with equation : f''/f=k with k a real. First, I can't divide a given equation by f(x)*g(t). Beside, assume(k>0) seems not to be assumed by sage... -- | Sage Version 4.3.3, Release Date

[sage-support] Racional coercion of very small decimal numbers.

2010-05-07 Thread Rodrigo
I扉e benn playing with SAGE and some "important numbers". I came about this situation where I don't understand exactly what is happening. (I'm using SAGE notebook 4.1.1) h=QQ(6.62606896 * 10^-34) h 1/1509190450683145507021944855149088 If I change this to: h=QQ(66.2606896 * 10^-35) h 1/150919045

[sage-support] edo

2010-05-07 Thread descopau
Hello, I have got some problems with equation : f''/f=k with k a real. First, I can't divide a given equation by f(x)*g(t). Beside, assume(k>0) seems not to be assumed by sage... -- | Sage Version 4.3.3, Release Dat

Re: [sage-support] Re: Sagetex wont plot

2010-05-07 Thread Dan Drake
On Thu, 06 May 2010 at 10:51AM -0700, Oscar wrote: > I tried export PATH=/Applications/sage/:$PATH in Terminal and got > this: > > export: Command not found. > > I'm running Mac OS 10.5.8. Hrm, are you using bash or tcsh for your shell? That should work in bash. I don't know how to export environ