Re: [sage-devel] bug report: hash(1/x) != hash( (-1)/(-x) )

2015-01-23 Thread Erik Massop
nguished. For non-nice rings, I think it might be good to embed into a ring where there is a distinguished fraction representation and take the hash there. For instance Q(R[X]) might be embedded in Q(Q(R)[X]), which is better since Q(R)[X] is Euclidean. Regards, Erik Massop -- You received thi

Re: [sage-devel] BUG IN COMPILE

2014-11-29 Thread Erik Massop
2014-11-29 20:30 GMT+00:00 Joni-Pekka Kurronen : ... > (sage-sh) root@mpi1:src$ ... Are you compiling as root? Try compiling as a non-root user; Python refuses some things when run as root as a security precaution. Regards, Erik Massop -- You received this message because you are subscri

Re: [sage-devel] Bug in abs(I*x).diff(x)

2014-11-25 Thread Erik Massop
n this thread > currently returns 0. Do you get the same result? I'm not interested enough to calculate this by hand, sorry. > Since the derivative is 0 would we want to say therefore that > > log(exp(z-conjugate(z))) > > is a constant? If not, isn't this an argument for

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-28 Thread Erik Massop
On Tue, 28 Oct 2014 13:24:18 -0700 (PDT) Volker Braun wrote: > The language is explained here > > http://www.sagemath.org/doc/tutorial/tour_coercion.html#conversion-versus- coercion Thanks! > On Tuesday, October 28, 2014 8:06:44 PM UTC, Erik Massop wrote: > > > > s

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-28 Thread Erik Massop
On Tue, 28 Oct 2014 10:41:16 -0700 (PDT) Volker Braun wrote: > On Tuesday, October 28, 2014 5:16:47 PM UTC, Erik Massop wrote: > > > > class CoercingDict: > > def __init__(self, f): > > self.f = f > > self.data = dict()

Re: [sage-devel] Re: __cmp__ vs. __eq__ in element class

2014-10-28 Thread Erik Massop
and # self.x.__eq__ (other.x) otherwise def __hash__(self, x): # recurse for tuples, frozensets, ... # try _strict_hash_ # otherwise use __hash__ Regards, Erik Massop -- You received this message because you are subscribed to the Google

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-23 Thread Erik Massop
ppose furthermore that you have a (facade) poset with elements x, y, and E=(x,y). Now foo'(x,y) has args==(x,y)==E and therefore returns E regardless of the order in the poset, which is not what is wanted from foo'(x,y). Regards, Erik Massop -- You received this message because you a

Re: [sage-devel] Re: Poset/lattice, join and join_matrix

2014-10-23 Thread Erik Massop
though as iterables [one,two] and (one,two) are the same. Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...

Re: [sage-devel] Graphs and order of vertices

2014-10-21 Thread Erik Massop
(G.vertex_iterator()) == list(H.vertex_iterator()) False The trick underlying the example is the same as before: sage: hash(-1) == hash(-2) True Cheers, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this grou

Re: [sage-devel] Graphs and order of vertices

2014-10-21 Thread Erik Massop
aph. Do > you have an example where it is not the case ? Yes: G = Graph() G.add_vertex(zero) G.add_vertex(one) H = Graph() H.add_vertex(one) H.add_vertex(zero) print G == H print list(G.vertex_iterator()) == list(H.vertex_iterator()) print G.vertices() == H.vertices() gives me True False

Re: [sage-devel] Graphs and order of vertices

2014-10-20 Thread Erik Massop
st of incoming or outgoing list? If there is a total (pre)order, everything should be fine. If there is not, my bet is as good as yours. > Is there even some kind of general rule about this kind of thing at Sage? If there is, I'd like to know. Regards, Erik Massop -- You received t

Re: [sage-devel] Re: Tell me how the design of the Poset class is not flawed

2014-09-29 Thread Erik Massop
r ii) making up a total ordering of the occurring vertex labels and storing it globally. There're probably more options, but I hope this helps. Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubs

Re: [sage-devel] Re: sign() and comparison in AA

2014-09-17 Thread Erik Massop
rrible thing ] So in this case the old description would give a much more efficient comparison. Unfortunately, it's discarded... Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and st

Re: [sage-devel] Re: How to view a "red" branch on Trac

2014-09-03 Thread Erik Massop
y GUI-y though... Moreover the merge conflicts will still have to be fixed. This view might help with doing the merge though. Regards, Erik Massop [1] http://git.sagemath.org/sage.git/diff/?id2=develop&id=u/vinceknight/game_theory__build_capacity_to_solve_matching_games_in_to_sage_ [2] http:

Re: [sage-devel] Re: About "pi?"

2014-08-22 Thread Erik Massop
Dear all, This is now ticket #16871: http://trac.sagemath.org/ticket/16871 Regards, Erik Massop On Thu, 21 Aug 2014 13:33:53 -0700 (PDT) Volker Braun wrote: > +1 to dynamically generating a suitable docstring if the expression > consists only of a single constant. But IMHO it

Re: [sage-devel] Re: About "pi?"

2014-08-21 Thread Erik Massop
a docstring-perspective is probably getting rid of expression(). Is there a ticket for this? Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-20 Thread Erik Massop
so, do you have some pointers? That'd be interesting. Regards, Erik Massop On Wed, 20 Aug 2014 16:47:03 -0700 (PDT) rjf wrote: > > > On Saturday, August 9, 2014 7:35:13 PM UTC-7, Erik Massop wrote: > > > > > > > > > > Similarly I would call

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-09 Thread Erik Massop
measure the sensitivity of > the computed solution to slight changes in the initial data. The > numbers used in solving the system are exactly the represented > floating-point numbers. > > > They're representatives for the actual (either unknown or impossible > > to represent)

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-09 Thread Erik Massop
nt set becomes apparent when comparing assertions I and IV. The words "of ZZ/3ZZ" are important indeed in assertion VI: If we had read "of ZZ", then this assertion would be pointing directly at its own counterexample. Regards, Erik Massop -- You received this message because yo

Re: [sage-devel] "Groups" in Sage

2014-07-23 Thread Erik Massop
Category of unital magmas, Category of magmas, Category of finite enumerated sets, Category of enumerated sets, Category of finite sets, Category of sets, Category of sets with partial maps, Category of objects] sage: [x for x in G] [(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)] sage: G.first() () sage: G.last

[sage-devel] Is _hash_ used?

2014-06-12 Thread Erik Massop
often. So I did $ git grep \\b_hash_\\b and found only a few handfuls of matches for _hash_. Also __hash__ of SageObject[2] is just hash(self.__repr__()), so there is no caching there. It seems to me that _hash_ is not used as suggested in the tutorial, or am I missing something? Regards, Erik

Re: [sage-devel] Re: Re: Re: hash for algebraic field

2014-06-11 Thread Erik Massop
. You should be careful about the key universe though. If the map from the old universe to the new one is not injective you might end up with several values for the same key, so either the universe should be specified up front, or an exception should be thrown when there are clashes. Regards, Erik

Re: [sage-devel] Re: hash for algebraic field

2014-06-09 Thread Erik Massop
es for rationals: sage: map(lambda X: hash(X(1/2)), [QQ, float, RR, CC, RIF, CIF, AA, QQbar]) [3, 1073741824, 1073741824, 1073741824, 2047423852, 128131206, -1422939175, -2128581059] Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "

Re: [sage-devel] Re: hash for algebraic field

2014-06-09 Thread Erik Massop
that the contract is satisfied for all relevant keys. (This would avoid having to change all cached functions.) Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from

Re: [sage-devel] hash for algebraic field

2014-06-09 Thread Erik Massop
ars and then hashing. (I think this would also make it easier to have representation independence as normalization is probably easier over fields.) What do you think is the way to go? Regards, Erik Massop [1] https://docs.python.org/2/library/functions.html#hash : "Numeric values that compa

Re: [sage-devel] Re: git diff branch1..develop

2014-05-01 Thread Erik Massop
ening for me to learn git-trac now, so I tried this only with pure git ("git fetch trac" and "git push trac master:u/emassop/test"). I really don't see why this would interfere with git-trac though. Regards, Erik Massop [1] http://technosorcery.net/blog/2011/12/26/ho

Re: [sage-devel] Please review #15699: Glibc scanf workaround for ATLAS

2014-01-22 Thread Erik Massop
s a different approach, namely replacing scanf by strtod. The patch is a bit more complicated than necessary, as checking "end ! = buf" instead of "errno == 0 && end ! = buf && *end == '\n'" is probably sufficient for this usecase. Regards, Erik Massop --

[sage-devel] Cannot login to trac webinterface

2014-01-22 Thread Erik Massop
their password? Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, sen

Re: [sage-devel] Re: building sage 6.0 on debian live (squeeze)

2013-12-24 Thread Erik Massop
conf['SPARC?']: print 'Base configuration on SPARC.' arch = 'USIII' elif conf['PPC?']: print 'Base configuration on PPC.' arch = 'PPCG4' elif conf['IA64?']: print 'Base configur

Re: [sage-devel] Re: Sage 5.12 fails to build Atlas, 64-bit SuSE 13.1

2013-11-22 Thread Erik Massop
On Fri, 22 Nov 2013 03:59:01 -0800 Paul Lutus wrote: > On 11/22/2013 03:08 AM, Erik Massop wrote: > > On Thu, 21 Nov 2013 16:28:52 -0800 (PST) > > lutusp wrote: > > > >> On Thursday, November 21, 2013 1:23:14 PM UTC-8, lutusp wrote: > >>> matime: Asser

Fw: Re: [sage-devel] Re: Sage 5.12 fails to build Atlas, 64-bit SuSE 13.1

2013-11-22 Thread Erik Massop
Begin forwarded message: Date: Fri, 22 Nov 2013 03:59:01 -0800 From: Paul Lutus To: Erik Massop Subject: Re: [sage-devel] Re: Sage 5.12 fails to build Atlas, 64-bit SuSE 13.1 On 11/22/2013 03:08 AM, Erik Massop wrote: > On Thu, 21 Nov 2013 16:28:52 -0800 (PST) > lutusp wrote: &

Re: [sage-devel] Re: Sage 5.12 fails to build Atlas, 64-bit SuSE 13.1

2013-11-22 Thread Erik Massop
> no changes. This looks like the bug [1] in glib 2.18, in which scanf fails to read "0e+00". See the thread "ATLAS build fails on Core i7-3770" on this list. Was 5.11 built using the same glibc version? Regards, Erik Massop [1] https://sourceware.org/bugzilla/show_bug.c

Re: [sage-devel] Re: ATLAS build fails on Core i7-3770

2013-10-31 Thread Erik Massop
Dear list, On Thu, 31 Oct 2013 14:19:29 + (UTC) Dima Pasechnik wrote: > On 2013-10-30, Erik Massop wrote: > > This seems to be the bug 'scanf %f doesn't parse "0e+0" correctly' in > > glibc [1]. > > is it really a bug? I am not sure. Normally

Re: [sage-devel] Re: ATLAS build fails on Core i7-3770

2013-10-30 Thread Erik Massop
Dear list, This seems to be the bug 'scanf %f doesn't parse "0e+0" correctly' in glibc [1]. Regards, Erik Massop [1] https://sourceware.org/bugzilla/show_bug.cgi?id=15917 On Wed, 30 Oct 2013 13:48:38 +0100 Erik Massop wrote: > Dear list, > > On We

Re: [sage-devel] Re: ATLAS build fails on Core i7-3770

2013-10-30 Thread Erik Massop
eadlines, and therefore no time to figure out how to keep my modification from being moved to old/. Regards, Erik Massop -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it,

Re: [sage-devel] Re: ATLAS build fails on Core i7-3770

2013-10-29 Thread Erik Massop
smuladd.o time.o /home/erik/sage/local/var/tmp/sage/build/atlas-3.10.1.p6/ATLAS-build/bin/ATLrun.sh /home/erik/sage/local/var/tmp/sage/build/atlas-3.10.1.p6/ATLAS-build/tune/sysinfo xsma -f /tmp/xsma.out -m 1000 $ cat /tmp/xsma.out 2255.64 2255.64 2272.73 Regards, Erik Massop -- You recei

Re: [sage-devel] ATLAS build fails on Core i7-3770

2013-10-29 Thread Erik Massop
nsequently the next value cannot be read correctly. (Interestingly scanf does read all of "1e+00" and "0.0e+00".) Work-around might be to read line by line and use sscanf instead of scanf. Regards, Erik Massop On Mon, October 28, 2013 10:37 pm, fechn...@gmail.com wrote: > Hi, >