Ticket #14184: 14184_manual.patch

File 14184_manual.patch, 4.5 KB (added by jdemeyer, 7 years ago)
  • sage/interfaces/qsieve.py

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1362043925 -3600
    # Node ID 2680bf71581021a93f1203177e51c25e5288e476
    # Parent  61eb27ccc8c70911bf7fa464028c2c26f7045726
    Fix # optional tags (manually)
    
    diff --git a/sage/interfaces/qsieve.py b/sage/interfaces/qsieve.py
    a b  
    44
    55import os
    66
    7 cygwin = os.uname()[0][:6]=="CYGWIN"
    8 
    97import sage.rings.integer
    108
    119from sage.misc.all import tmp_dir
     
    5654               by the command line time command.  (If time is False,
    5755               this is always an empty string.)
    5856
    59     EXAMPLES:
     57    EXAMPLES::
     58
    6059        sage: k = 19; n = next_prime(10^k)*next_prime(10^(k+1))
    6160        sage: factor(n)  # (currently) uses PARI
    6261        10000000000000000051 * 100000000000000000039
    63         sage: v, t = qsieve(n, time=True)   # uses the sieve    (optional: time doesn't work on cygwin)
    64         sage: v                                          # optional
     62        sage: v, t = qsieve(n, time=True)   # uses qsieve; optional - time
     63        sage: v                             # optional - time
    6564        [10000000000000000051, 100000000000000000039]
    66         sage: t                                          # random; optional
     65        sage: t                             # random; optional - time
    6766        '0.36 real         0.19 user         0.00 sys'
    6867    """
    6968    Z = sage.rings.integer.Integer
     
    8180    blocking until complete.
    8281    """
    8382    if time:
    84         if cygwin:
    85              raise ValueError, "qsieve time not supported on Cygwin"
    8683        t = 'time '
    8784    else:
    8885        t = ''
     
    137134    A non-blocking version of Hart's quadratic sieve.
    138135
    139136    The sieve starts running when you create the object, but you can
    140     still use Sage in parallel:
     137    still use Sage in parallel.
     138
     139    EXAMPLES::
    141140
    142141        sage: k = 19; n = next_prime(10^k)*next_prime(10^(k+1))
    143         sage: q = qsieve(n, block=False, time=True)           # optional - time
    144         sage: q           # random output                     # optional
     142        sage: q = qsieve(n, block=False, time=True)  # optional - time
     143        sage: q           # random output; optional - time
    145144        Proper factors so far: [] 
    146         sage: q           # random output                     # optional
     145        sage: q           # random output; optional - time
    147146        ([10000000000000000051, 100000000000000000039], '0.21')
    148         sage: q.list()    # random output                     # optional
     147        sage: q.list()    # random output; optional - time
    149148        [10000000000000000051, 100000000000000000039]
    150         sage: q.time()    # random output     (optional -- requires time command)
     149        sage: q.time()    # random output; optional - time
    151150        '0.21'
    152151
    153152        sage: q = qsieve(next_prime(10^20)*next_prime(10^21), block=False)
     
    159158    def __init__(self, n, time):
    160159        self._n = n
    161160        if time:
    162             if cygwin:
    163                 raise ValueError, "qsieve time not supported on Cygwin"
    164161            cmd = 'time QuadraticSieve'
    165162        else:
    166163            cmd = 'QuadraticSieve'
     
    255252        Terminate the QuadraticSieve process, in case you want
    256253        to give up on computing this factorization.
    257254
    258         EXAMPLES:
     255        EXAMPLES::
     256
    259257            sage: n = next_prime(2^110)*next_prime(2^100)
    260258            sage: qs = qsieve(n, block=False)
    261259            sage: qs
  • sage/lfunctions/sympow.py

    diff --git a/sage/lfunctions/sympow.py b/sage/lfunctions/sympow.py
    a b  
    122122        If you would like to see the extensive output sympow prints when
    123123        running this function, just type ``set_verbose(2)``.
    124124       
    125         EXAMPLES::
     125        EXAMPLES:
     126
     127        These examples only work if you run ``sympow -new_data 2`` in a
     128        Sage shell first. Alternatively, within Sage, execute::
     129
     130            sage: sympow('-new_data 2')  # not tested
     131
     132        This command precomputes some data needed for the following
     133        examples. ::
    126134       
    127             sage: a = sympow.L(EllipticCurve('11a'), 2, 16); a   # optional
     135            sage: a = sympow.L(EllipticCurve('11a'), 2, 16)  # not tested
     136            sage: a                                          # not tested
    128137            '1.057599244590958E+00'
    129             sage: RR(a)                    # optional - precomputations
     138            sage: RR(a)                                      # not tested
    130139            1.05759924459096
    131140        """
    132141        if n % 2 == 1: