#8327: Implement the universal cyclotomic field, using Zumbroich basis
-----------------------------------------------------+----------------------
Reporter: nthiery | Owner:
Type: enhancement | Status:
needs_review
Priority: major | Milestone: sage-5.6
Component: number fields | Resolution:
Keywords: Cyclotomic field, Zumbroich basis | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Christian Stump, Simon King | Merged in:
Dependencies: #13765 | Stopgaps:
-----------------------------------------------------+----------------------
Comment (by nbruin):
Hi Christian,
Sorry that your code review is devolving into a kind of "how to vet newly
introduced parents" experiment. Please don't take it personally! I think
we're still getting useful contributions to Sage at large from this for
now, though.
For doing good (generic) tests for how hash performs:
{{{
sage: any( E(n) in L for n in [1001..2000] )
False
}}}
This test doesn't really test the non-constantness of hashes. This code
would still work if `hash(E(n))==0` would hold for all `n`. After equality
of hash value, `in` will still fall back on `__eq__`, with one exception:
identical objects will be found with `in`:
{{{
sage: n = float(NaN)
sage: n == n
False
sage: n in set([n])
True
sage: m = float(NaN)
sage: m in set([n])
False
}}}
It's an optimization that is necessary for python to have reasonable
performance that leads to nasty consequences for objects that are not
equal to themselves (which is really an odd edgecase anyway)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8327#comment:164>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.