#17196: Relax assumptions on bitset operations
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.4
Component: misc | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer, | Reviewers:
Simon King | Work issues:
Report Upstream: N/A | Commit:
Branch: public/17196 | 3ae75a1f8fcfee0f78faf9bb4bb006149b535c45
/relax-assumptions-on-bitset- | Stopgaps:
operations |
Dependencies: |
-------------------------------------+-------------------------------------
Description changed by jdemeyer:
Old description:
> Most bitset operations state something like
> {{{
> We assume the two sets have the same size. Otherwise, the
> behavior of this function is undefined and the function may
> segfault.
> }}}
>
> However, in fact many of these requirements can be relaxed.
>
> In many cases, I simply change the comment to indicate what the real
> conditions are. For shifts, I actually change the implementation slightly
> such that the condition becomes ``r.size <= a.size + n`` which is useful
> for #15820.
New description:
Most bitset operations state something like
{{{
We assume the two sets have the same size. Otherwise, the
behavior of this function is undefined and the function may
segfault.
}}}
However, in fact many of these requirements can be relaxed.
In many cases, I simply change the comment to indicate what the real
conditions are. For shifts, I actually change the implementation slightly
such that the condition becomes ``r.size <= a.size + n`` which is useful
for #15820.
Also move bitsets to `src/sage/data_structures`.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17196#comment:17>
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 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-trac.
For more options, visit https://groups.google.com/d/optout.