sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.48k stars 488 forks source link

Quadratics in GF(2^m) #6607

Open b645e621-c8d9-404b-89d5-ffb9b144f158 opened 15 years ago

b645e621-c8d9-404b-89d5-ffb9b144f158 commented 15 years ago

Added specialized code for factoring quadratic polynomials over GF(2^m).

Component: algebra

Keywords: quadratics, characteristic 2

Work Issues: rebase

Author: Preston Wake, Wouter Castryck

Issue created by migration from https://trac.sagemath.org/ticket/6607

7c09a680-e216-4024-bb8e-9bfd4aa7f313 commented 15 years ago
comment:2

Please follow coding conventions, especially those documented in the Developers' Guide and PEP-0008. Don't be afraid to use white spaces in your code. The patch contains codes that are squeezed together; this is difficult to read. For example, this is bad:

def gftwosqrt(r): 
    """ 
    Quickly finds the squareroot of an element in GF(2^m) 
    """
    F=r.parent() 
    c=F.cardinality() 
    return r**(c/2)

and you should do this instead:

def gftwosqrt(r): 
    """ 
    Quickly finds the squareroot of an element in GF(2^m)

    INPUT:

    <explain any input to this function>

    OUTPUT:

    <what's the expected output of this function?>

    EXAMPLES::

        <add-more-doctests-here>
    """
    F = r.parent() 
    c = F.cardinality() 
    return r**(c/2)

For more information about writing docstrings, see this section. Apart from these, there are other reasons to reject the patch, as documented here.

b645e621-c8d9-404b-89d5-ffb9b144f158 commented 15 years ago

fixed old patch... better documentation etc

b645e621-c8d9-404b-89d5-ffb9b144f158 commented 15 years ago

Attachment: 12538.patch.gz

Attachment: quad.patch.gz

fixed references

b645e621-c8d9-404b-89d5-ffb9b144f158 commented 15 years ago
comment:3

quad.patch should replace 12538.patch

aghitza commented 15 years ago
comment:6

This has been sitting for a while and got some bitrot. It doesn't apply cleanly against sage-4.2.

Preston, can you rebase it on sage-4.2? I'll try to review it quickly after that so you don't have to do this again.

Actually, while you're at it, do you want to just put up a new standalone patch? As it stands now, quad.patch is dependent on 12538.patch.

aghitza commented 15 years ago

Work Issues: rebase