Ticket #1243: 1243.patch

File 1243.patch, 5.5 KB (added by mhansen, 14 years ago)
  • sage/misc/misc.py

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1196909332 21600
    # Node ID 84f1e44f1b04430f13c980148c4f1980edf43900
    # Parent  224f92c7866ca84624b21ca5b334134a4da1eaa1
    Fixed #1243.
    
    diff -r 224f92c7866c -r 84f1e44f1b04 sage/misc/misc.py
    a b def ellipsis_range(*args, **kwds): 
    825825        sage: ellipsis_range(0,Ellipsis,10,Ellipsis,20,step=2)
    826826        [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
    827827     
    828       Sometimes one or more ranges is emtpy.
     828      Sometimes one or more ranges is empty.
    829829        sage: ellipsis_range(100,Ellipsis,10,Ellipsis,20,step=2)
    830830        [10, 12, 14, 16, 18, 20]
    831831        sage: ellipsis_range(0,Ellipsis,10,Ellipsis,-20,step=2)
    def exists(S, P): 
    12321232        (True, 5)
    12331233
    12341234    The following example is similar to one in the MAGMA handbook.  We
    1235     check whether certain integers are a some of two (small) cubes:
     1235    check whether certain integers are a sum of two (small) cubes:
    12361236
    12371237        sage: cubes = [t**3 for t in range(-10,11)]
    12381238        sage: exists([(x,y) for x in cubes for y in cubes], lambda v : v[0]+v[1] == 218)
    def getitem(v, n): 
    14321432    EXAMPLES:
    14331433        sage: v = [1,2,3]
    14341434
    1435     The following use to fail in SAGE <= 1.3.7.  Now it works fine:
     1435    The following used to fail in SAGE <= 1.3.7.  Now it works fine:
    14361436        sage: v[ZZ(1)]         
    14371437        2
    14381438
  • sage/rings/polynomial/polynomial_element.pyx

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/rings/polynomial/polynomial_element.pyx
    a b cdef class Polynomial(CommutativeAlgebra 
    913913        return generic_power(self, right)
    914914       
    915915    def _pow(self, right):
    916         # TODO: fit __pow__ into the arithmatic structure
     916        # TODO: fit __pow__ into the arithmetic structure
    917917        if self.degree() <= 0:
    918918            return self.parent()(self[0]**right)
    919919        if right < 0:
  • sage/schemes/elliptic_curves/ell_point.py

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/schemes/elliptic_curves/ell_point.py
    a b class EllipticCurvePoint_finite_field(El 
    640640
    641641def make_point(X, v):
    642642    # TODO: Unpickled parents with base sometimes have thier base set to None.
    643     # This causes a segfault in the module arithmatic architecture.
     643    # This causes a segfault in the module arithmetic architecture.
    644644    #
    645645    # sage: H = HomsetWithBase(QQ, RR, base=ZZ); H
    646646    # sage: H0 = loads(dumps(H))
  • sage/structure/coerce.pxi

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/structure/coerce.pxi
    a b cdef inline arith_error_message(x, y, op 
    7171        return "unsupported operand parent(s) for '%s': '%s' and '%s'"%(n, parent_c(x), parent_c(y))
    7272
    7373#################################################################################
    74 # Inline arithmatic dispatchers for ModuleElements and RingElements
     74# Inline arithmetic dispatchers for ModuleElements and RingElements
    7575#################################################################################
    7676
    7777cdef inline ModuleElement _add_c(ModuleElement left, ModuleElement right):
    cdef inline RingElement _idiv_c(RingElem 
    144144        return left._idiv_c_impl(right)
    145145
    146146cdef enum:
    147     # 3 references: handle, scope container, and arithmatic call stack
     147    # 3 references: handle, scope container, and arithmetic call stack
    148148    inplace_threshold = 0
    149149   
    150150
  • sage/structure/coerce.pyx

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/structure/coerce.pyx
    a b cdef class CoercionModel_profile(Coercio 
    518518       
    519519    We can read of this data that the most expensive operation was the creation
    520520    of the action of $\Q$ on $\Z[x]$ (whose result lies in $\Q[x]$. This has
    521     been cached as illistrated below.
     521    been cached as illustrated below.
    522522   
    523523        sage: coerce.flush()
    524524        sage: z = 1/2 * x + .5
  • sage/structure/element.pyx

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/structure/element.pyx
    a b and classes are similar. There are four  
    152152   implementations of either _add_ or _add_c_impl.
    153153
    154154
    155 For speed, there are also {\bf inplace} version of the arithmatic commands.
     155For speed, there are also {\bf inplace} version of the arithmetic commands.
    156156DD NOT call them directly, they may mutate the object and will be called
    157157when and only when it has been determined that the old object will no longer
    158158be accessible from the calling function after this operation.
  • sage/structure/parent_base.pyx

    diff -r 224f92c7866c -r 84f1e44f1b04 sage/structure/parent_base.pyx
    a b include "../ext/stdsage.pxi" 
    99include "../ext/stdsage.pxi"
    1010
    1111# TODO: Unpickled parents with base sometimes have thier base set to None.
    12 # This causes a segfault in the module arithmatic architecture.
     12# This causes a segfault in the module arithmetic architecture.
    1313#
    1414# sage: H = HomsetWithBase(QQ, RR, base=ZZ); H
    1515# sage: H0 = loads(dumps(H))