Ticket #922: 922.patch

File 922.patch, 914 bytes (added by robertwb, 14 years ago)
  • sage/rings/arith.py

    # HG changeset patch
    # User Robert Bradshaw <robertwb@math.washington.edu>
    # Date 1192909205 25200
    # Node ID e8a549c75fd221c8e51b86c95ecf4d698488ffeb
    # Parent  e595259bce6837e80860057e5a7f38a2b3aea129
    Fix Ticket #922, bug in prime_powers
    
    diff -r e595259bce68 -r e8a549c75fd2 sage/rings/arith.py
    a b def prime_powers(start, stop=None): 
    513513        True
    514514    """
    515515    if stop is None:
    516         start, stop = 1, int(start)
     516        start, stop = 1, integer.Integer(start)
    517517    from math import log
    518518    from bisect import bisect
    519519    v = prime_range(stop)
    def prime_powers(start, stop=None): 
    525525    else:
    526526        w = list(v)
    527527    if start <= 1:
    528         w.insert(0, 1)
     528        w.insert(0, integer.Integer(1))
    529529    log_stop = log(stop)
    530530    for p in v:
    531531        q = p*p