#17196: Relax assumptions on bitset operations
----------------------------------+------------------------
       Reporter:  jdemeyer        |        Owner:
           Type:  enhancement     |       Status:  new
       Priority:  major           |    Milestone:  sage-6.4
      Component:  misc            |   Resolution:
       Keywords:                  |    Merged in:
        Authors:  Jeroen Demeyer  |    Reviewers:
Report Upstream:  N/A             |  Work issues:
         Branch:                  |       Commit:
   Dependencies:                  |     Stopgaps:
----------------------------------+------------------------
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.

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.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/17196#comment:2>
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.

Reply via email to