Hi John, On 2014-04-29, John Cremona <[email protected]> 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 compared by "==". And here, we have sage: hash(s) 1222794601 sage: hash(t) 402435335 So, it is a bug, since it violates the defining property of a hash function: If two things evaluate equal, then their hash must be equal. I just see that the hash of fraction field elements is formed from the hashes of the numerator and the denominator --- which of course is wrong, if numerator and denominator have a non-trivial gcd. Best regards, Simon -- 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 it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
