On Mon, 28 Apr 2014, Nils Bruin wrote:
Nor is computing the characteristic polynomial. Note that `eigenvalues` returns its
answer in the field
of algebraic numbers. Equality testing is notoriously difficult there, and
since the characteristic
polynomials of your matrices are not square-free,
Eigenvalues on symmetric real matrix are reals. However
n=184
l=range(1,n+1)
M=matrix([[floor(n/lcm(i,j)) for i in l] for j in l])
f=factor(M.characteristic_polynomial())
f[4][0].roots(AA, multiplicities=False)
gives AssertionError. Is this a bug? It works for 2 = n = 183.
When using QQbar
If this is not a bug then I don't know what a Set is in Sage! I
define two objects which are equal as tested by == but when I put them
into a Set I get two elements, not one:
sage: K.z = CyclotomicField(3)
sage: Ku.u = FractionField(PolynomialRing(K,'u'))
sage: a = 27*u^2+81*u+243
sage: b =
Hi John,
On 2014-04-29, John Cremona john.crem...@gmail.com wrote:
sage: s==t
True
sage: Set([s,t])
{(27*u^2 + 81*u + 243)/(27*u - 81), (u^2 + 3*u + 9)/(u - 3)}
Internally, a set would first distribute the given elements in hash
buckets. Elements in different hash buckets will not be
s and t are not the same expression, so they have different hashes. We
break Python by letting them compare equal. Hence the outcome of putting
them into sets is undefined. In CPython: if the hash collides, you get one
element. If the hash does not collide, you get two elements.
On Tuesday,
On 29 April 2014 15:16, Volker Braun vbraun.n...@gmail.com wrote:
s and t are not the same expression, so they have different hashes. We break
Python by letting them compare equal. Hence the outcome of putting them into
sets is undefined. In CPython: if the hash collides, you get one element.
Hi John,
On 2014-04-29, John Cremona john.crem...@gmail.com wrote:
That is a *very* unsatisfactory explanation for anyone actually
wanting to use Sage to do mathematics.
+1
That
function could easily be amended to do the second step, which would
make it more useful.
... and it should be
On 29 April 2014 15:47, Volker Braun vbraun.n...@gmail.com wrote:
On Tuesday, April 29, 2014 3:35:55 PM UTC+1, John Cremona wrote:
On 29 April 2014 15:16, Volker Braun vbrau...@gmail.com wrote:
s and t are not the same expression, so they have different hashes. We
break
Python by letting
Hi Volker,
On 2014-04-29, Volker Braun vbraun.n...@gmail.com wrote:
Always putting things in canonical form will be slow (there is no hook for
you are about to be put into a set)
Yes there is! The hook is the hash function. If you need a hash (i.e.,
if you put it into a set or dict) then you
On Tuesday, April 29, 2014 3:35:55 PM UTC+1, John Cremona wrote:
On 29 April 2014 15:16, Volker Braun vbrau...@gmail.com javascript:
wrote:
s and t are not the same expression, so they have different hashes. We
break
Python by letting them compare equal. Hence the outcome of putting
On Tuesday, April 29, 2014 7:47:39 AM UTC-7, Volker Braun wrote:
Always putting things in canonical form will be slow (there is no hook for
you are about to be put into a set) and/or not possible (fp group
elements).
I disagree in this particular case. Making the denominator monic is
On 29 April 2014 16:17, Nils Bruin nbr...@sfu.ca wrote:
On Tuesday, April 29, 2014 7:47:39 AM UTC-7, Volker Braun wrote:
Always putting things in canonical form will be slow (there is no hook for
you are about to be put into a set) and/or not possible (fp group
elements).
I disagree in
On Tuesday, April 29, 2014 3:58:14 PM UTC+1, Simon King wrote:
Yes there is! The hook is the hash function.
CPython implementation detail and subject to change... really Python makes
no guarantee that __hash__() is called at any particular point. Its of
course safe to normalize elements
Adding row constraints one at a time is slow because of the internal data
structures that simplex solvers use. In large LPs/IPs, the constraint
matrix is almost always sparse, and so allocating an entire dense matrix
doesn't make sense. Instead, a packed sparse matrix is used. Because of
the
I have tried to install Sage in an old laptop with Lubuntu with the
following three commands:
--
$ sudo -E apt-add-repository -y ppa:aims/sagemath
$ sudo -E apt-get update
$ sudo -E apt-get install sagemath-upstream-binary
--
but the last command returned
--
Package
On Tue, Apr 29, 2014 at 9:07 AM, Volker Braun vbraun.n...@gmail.com wrote:
On Tuesday, April 29, 2014 3:58:14 PM UTC+1, Simon King wrote:
Yes there is! The hook is the hash function.
CPython implementation detail and subject to change... really Python makes
no guarantee that __hash__() is
16 matches
Mail list logo