Re: [sage-support] findroot error

2013-06-04 Thread Alastair Irving
. Although you can evaluate f(5,6) you cannot do f(mp.convert(5),mp.convert(6)) as Sage cannot do x-mp.convert(5) HTH Alastair Irving -- You received this message because you are subscribed to the Google Groups sage-support group. To unsubscribe from this group and stop receiving emails from

Re: [sage-support] weird comparison of rational numbers

2012-10-18 Thread Alastair Irving
tivision, that is p[1]/p[0] is evaluating to 0, hence the comparison is correct. Alastair Irving -- You received this message because you are subscribed to the Google Groups sage-support group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send

Re: [sage-support] What's wrong with this comparison?

2012-09-12 Thread Alastair Irving
On 12/09/2012 15:14, P Purkayastha wrote: Can anyone point out what is wrong with this comparison: sage: 0.2 + 0.1 == 0.3 False It seems baffling that something as simple as this returns False. Its a fairly common problem with doing arithmetic with floatingpoint numbers as they are only

[sage-support] Numerically integrating over a region defined by linear inequalities

2012-06-16 Thread Alastair Irving
a Polyhedron object to store the region of interest is there any way of getting functions from it which describe the limits of integration? Ideally, if P is a Polyhedron it would be nice to have something like P.integral(f) which computes the integral of f over P. Many thanks Alastair Irving

Re: [sage-support] Matrices and Cyclotomics

2012-04-26 Thread Alastair Irving
On 25/04/2012 16:45, Graham Gerrard wrote: Finding occasional inconsistencies when using matrices with cyclotomic entries, though works well most of the time... sage: s=CyclotomicField(24,'s').gen() sage: (8*s^6-1)^10 -1098715216*s^6 - 372960063 sage: xb=matrix(1,1,[8*s^6-1]) sage: xb^10

Re: [sage-support] Equal lists may not be equal

2012-04-09 Thread Alastair Irving
On 09/04/2012 21:02, Kent Morrison wrote: In this snippet of Sage code I believe that pos is [1,2,3]. But mod(1,p) in pos evaluates to False, while mod(1,p) in [1,2,3] evaluates to True. However 1%p in pos and 1%p in [1,2,3] both evaluate to True. This behaviour can be understood by using the

Re: [sage-support] Re: Matrices with Cyclotomic Fields

2012-03-02 Thread Alastair Irving
Hi If you do A.determinant(algorithm=DF) it is much much faster. Alastair On 02/03/2012 14:21, firebird wrote: Wrong conclusion in previous txn! The problem is with the matrix routines and not with the Cyclotomics. Wrote a couple of routines based on simple Gauss Seidel techniques

Re: [sage-support] Matrices with Cyclotomic Fields

2012-02-29 Thread Alastair Irving
On 29/02/2012 19:54, firebird wrote: I am having performance problems when using SAGE matrices with Cyclotomic Fields. Processing in GAP appears almost instant, whereas the similar computation takes of the order of a minute in SAGE. Am I missing something? Sage: F.s=CyclotomicField(29) m=[]

Re: [sage-support] Re: Animation with sage?

2012-01-12 Thread Alastair Irving
Hi If you're using a Sage Notebook on a server then Image Magik needs to be installed on that server, not on your local Windows machine. HTH Alastair On 12/01/2012 14:36, LFS wrote: Sorry Dan - I know how to click on download and then double-click on a setup.exe file. I am math, not

Re: [sage-support] if statements and arguments in sage

2011-11-08 Thread Alastair Irving
On 08/11/2011 16:52, Chappman wrote: Hi folks, When I try and do to two arguments in the same lines in sagemath it does not compute, this is what I have written: if A==1 and D==1 then case- 1 else if A==2 and D==1 then case- 2 Hi This is not the correct syntax for an if statement in

Re: [sage-support] Field of rational functions??

2011-08-30 Thread Alastair Irving
On 30/08/11 14:59, MathLynx wrote: (1) How does one define a field of rational functions in several variables? QQ[x,y] gives me the ring of polynomials in x y over QQ, but 2*x/y is not in this ring. R.x,y=PolynomialRing(QQ) K=R.fraction_field() HTH Alastair -- To post to this group, send

Re: [sage-support] Bug: Finding kernel of a matrix over GF(2) seems to be broken.

2011-08-19 Thread Alastair Irving
On 19/08/2011 18:57, Sucharit wrote: I am using Sage to compute homologies of large chain complexes. For this, I need to compute kernels of matrices over GF(2). The attached file testmatrix.sage contains the 128 X 120 matrix that I started with. The first command loads the file. The second

Re: [sage-support] Cython programming with finite field computations

2011-07-30 Thread Alastair Irving
On 28/07/2011 22:34, VictorMiller wrote: I want to do a lot of finite field computations, and want to use Cython to speed things up. It's not clear to me what the details are that I need to adhere to. I noticed from the comments in element_givaro.pyx that the givaro library is fastest from

Re: [sage-support] Re: Memleak when deleting elliptic curve over finite field ?

2011-06-15 Thread Alastair Irving
On 14/06/2011 21:58, Jean-Pierre Flori wrote: On 14 juin, 08:44, Simon Kingsimon.k...@uni-jena.de wrote: Since sage-nt seems to agree that it is a bug, I opened trac ticket #11474. Good ! About the original memleak, I tried looking at how EllipticCurves_finite_field (maybe not correct name)

[sage-support] Preparsing Cython file before compilation

2011-05-10 Thread Alastair Irving
Hi I've got a .sage file that I want to compile using Cython. If I just copy it to a .spyx file and do load myfile.spyx then the sage preparser is not called on the file. What's the simplest way of calling the preparser before compiling? Many thanks Alastair Irving -- To post

Re: [sage-support] Re: Volumes of polyhedra

2011-03-27 Thread Alastair Irving
On 27/03/2011 02:32, Marshall Hampton wrote: If p is your Polyhedron, you can use p.lrs_volume() to get the volume, but this requires the optional lrs package to be installed. It should be very easy to install lrs, just do sage -i lrs (or path/to/sage/ sage -i lrs if sage is not in your path).

Re: [sage-support] Re: function output to list

2011-03-26 Thread Alastair Irving
On 26/03/2011 08:52, clodemil wrote: Alastair, Thanks a lot. the Pytonic way: def Ppulse(mesures): return [N((l[0]-l[1]),12) for l in mesures] works(I shall need to understand/study why!!) Its a list comprehension. The other solution: def Ppulse(mesures): result=[] for k,l

[sage-support] Volumes of polyhedra

2011-03-26 Thread Alastair Irving
Hi I've created a polyhedron with the Polyhedron function. Is there any way I can find its volume?What about its surface area? Many thanks Alastair -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] function output to list

2011-03-25 Thread Alastair Irving
On 25/03/2011 13:15, clodemil wrote: Hi all, Here is a list: mesures=[[172,91,57],[181,88,58],[146,88,56],[191,85,59],[171,92,50], [157,93,55],[180,84,48],[142,77,60],[169,80,45],[162,76,59], [167,104,73],[166,81,53],[145,78,59],[163,98,58],[192,90,50], [184,85,60],[151,77,56]] # [[P

[sage-support] Some symbolic functions return python ints

2011-03-21 Thread Alastair Irving
HI All I'm running Sage 4.6.2. I've just noticed that if I evaluate various symbolic expressions which return 0 then the 0 returned is a python int, rather than a Sage integer. examples of such expressions are sin(0), tan(0), ln(0). Is there a reason for this or is it a bug? Best wishes

Re: [sage-support] Re: Some symbolic functions return python ints

2011-03-21 Thread Alastair Irving
On 21/03/2011 16:24, kcrisman wrote: This is important to fix, because some Sage code depends on the input in integer form being Sage integer or something else with Sage methods, not a Python int, and one could imagine someone relying on this and getting a nasty exception. exactly what

[sage-support] Counting lattice points inside convex polyhedra

2011-02-28 Thread Alastair Irving
Hi All I was wondering if sage implements any algorithm for counting the number of points with integer coordinates inside polyhedra with rational coordinates. even such an algorithm for polygons would be useful for me. Best wishes Alastair -- To post to this group, send email to

Re: [sage-support] Counting lattice points inside convex polyhedra

2011-02-28 Thread Alastair Irving
On 28/02/2011 13:19, D. S. McNeil wrote: I was wondering if sage implements any algorithm for counting the number of points with integer coordinates inside polyhedra with rational coordinates. even such an algorithm for polygons would be useful for me. Have a look at the integral_points

Re: [sage-support] Obtaining data from a computation in process

2010-09-13 Thread Alastair Irving
On 13/09/2010 20:01, Nick wrote: Hello! I have a computation running in Sage. It is a search of more or less the following form: Let S be an empty set. For i in some interval: Check some property for i If i satisfies the property: add i to the set S. I now realise I should have said print i

Re: [sage-support] continued_fraction returns nothing

2010-09-13 Thread Alastair Irving
On 13/09/2010 17:31, HÃ¥kan Granath wrote: In certain cases I get nothing from the continued_fraction function in the latest Sage version: -- | Sage Version 4.5.3, Release Date: 2010-09-04 | | Type

[sage-support] Finding the solution to a linear equation with minimal l1 norm

2010-09-09 Thread Alastair Irving
to be differentiable everywhere, which the l1 norm isn't. Are there any packages that provide the functionality I'm looking for? If not can my current method be improved upon? Many thanks Alastair Irving -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from

[sage-support] A couple of group theory questions

2010-07-10 Thread Alastair Irving
documentation for it so don't really know what I'm doing. In particular how can I construct all the groups of a given order using the database? Many thanks Alastair Irving -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage