#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):
Replying to [comment:158 stumpc5]:
> ??? What do you want me to do here? Are you talking about the hash for
the parent of the elements?
I only found hashes for elements in your patch. Hash values are supposed
to be machine-length integers associated to an object, consistent within
one session, equal for objects that compare as equal (and preferably not
equal to much else) [sage has to violate this due to equality being too
lax and not transitive in the presence of coercion] and very little
structure otherwise. In particular, the actual numerical values returned
don't matter. It's better to check the properties that actually matter
than particular values that are produced (which should be dependent on
32/64 bits because otherwise you're creating unnecessarily weak hashes on
64 bit)
Don't test the actual value returned by hash, but test its functionality.
Something like (do we have some example that exercises hashes
appropriately?):
{{{
sage: a = ...
sage: b = ...
sage: c = ...
sage: V = set([a,b])
sage: <definition for a> in V
true
sage: b in V
true
sage: c in V
false
}}}
and perhaps test your hash function is not the constant function and has a
reasonable distribution:
{{{
sage: L = [<object> for i in [1..100]]
sage: set(hash(x) for x in L).len() >= 98
true
}}}
You did mark the tests as `64 bit` which may or may not elicit the right
action from the doctesting framework, but it would be way better if your
test actually did work (and did test) on 32 bit as well, which you can do
by testing functionality, not value.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8327#comment:159>
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.