Changeset 7000:ffd7bb358653


Ignore:
Timestamp:
10/20/07 04:41:00 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Children:
7001:59e56080034d, 7004:df2b7fdd6ec4
Message:

Remove all instances of "sage.:".

Location:
sage
Files:
1 deleted
40 edited

Legend:

Unmodified
Added
Removed
  • sage/graphs/graph_fast.pyx

    r5700 r7000  
    232232    """ 
    233233    A quick python int to binary string conversion. 
    234      
    235     sage.: timeit sage.graphs.graph_fast.binary(389) 
    236     100000 loops, best of 3: 11.4 [micro]s per loop 
    237     sage.: timeit Integer(389).binary() 
    238     10000 loops, best of 3: 16.8 [micro]s per loop 
    239      
     234 
    240235    EXAMPLE: 
    241     sage: sage.graphs.graph_fast.binary(2007) 
    242     '11111010111' 
     236        sage: sage.graphs.graph_fast.binary(389) 
     237        '110000101' 
     238        sage: Integer(389).binary() 
     239        '110000101' 
     240        sage: sage.graphs.graph_fast.binary(2007) 
     241        '11111010111' 
    243242    """ 
    244243    cdef mpz_t i 
  • sage/groups/group.pyx

    r5724 r7000  
    138138            sage: G = D4.cayley_graph() 
    139139             
    140             sage.: show(G, color_by_label=True, edge_labels=True)   # todo -- we must test this, but must not have "sage -t" popping up windows.  
     140            sage: show(G, color_by_label=True, edge_labels=True)   # todo -- we must test this, but must not have "sage -t" popping up windows.  
    141141         
    142142            sage: A5 = AlternatingGroup(5); A5 
    143143            Alternating group of order 5!/2 as a permutation group 
    144144            sage: G = A5.cayley_graph() 
    145             sage.: G.show3d(color_by_label=True, arc_size=0.01, arc_size2=0.02, vertex_size=0.03) 
    146             sage.: G.show3d(vertex_size=0.03, arc_size=0.01, arc_size2=0.02, vertex_colors={(1,1,1):x.vertices()}, bgcolor=(0,0,0), color_by_label=True, xres=700, yres=700, iterations=200) # long time 
     145            sage: G.show3d(color_by_label=True, edge_size=0.01, edge_size2=0.02, vertex_size=0.03) 
     146            sage: G.show3d(vertex_size=0.03, edge_size=0.01, edge_size2=0.02, vertex_colors={(1,1,1):x.vertices()}, bgcolor=(0,0,0), color_by_label=True, xres=700, yres=700, iterations=200) # long time 
    147147 
    148148        AUTHOR: 
  • sage/groups/perm_gps/cubegroup.py

    r6218 r7000  
    11161116    """ 
    11171117    sage: C = RubiksCube().move("R U R'") 
    1118     sage.: C.show3d() 
     1118    sage: C.show3d() 
    11191119 
    11201120    sage: C = RubiksCube("R*L"); C 
     
    11321132                 | 35   47   24 | 
    11331133                 +--------------+ 
    1134     sage.: C.show() 
     1134    sage: C.show() 
    11351135    sage: C.solve(algorithm='gap')  # long time 
    11361136    'L*R' 
  • sage/gsl/interpolation.pyx

    r1928 r7000  
    2121        sage: v = [(i + sin(i)/2, i+cos(i^2)) for i in range(10)] 
    2222        sage: s = spline(v) 
    23         sage.: show(point(v) + plot(s,0,11, hue=.8))     
     23        sage: show(point(v) + plot(s,0,11, hue=.8))     
    2424    """ 
    2525    def __init__(self, v=[]): 
  • sage/gsl/ode.pyx

    r6996 r7000  
    119119         In code, 
    120120          
    121          sage: f = lambda t,y:[y[1],-y[0]] 
    122          sage: T.function=f 
     121            sage: f = lambda t,y:[y[1],-y[0]] 
     122            sage: T.function=f 
    123123 
    124124         For some algorithms the jacobian must be supplied as well, 
    125          the form of this should be a function return a list of lists of the form 
     125         the form of this should be a function return a list of lists 
     126         of the form 
     127 
    126128         [ [df_1/dy_1,...,df_1/dy_n], ..., [df_n/dy_1,...,df_n,dy_n], 
    127          [df_1/dt,...,df_n/dt] ]. There are examples below, if your jacobian was the function my_jacobian 
    128          you would do. 
    129  
    130          sage.: T.jacobian = my_jacobian 
     129         [df_1/dt,...,df_n/dt] ]. 
     130 
     131         There are examples below, if your jacobian was the function 
     132         my_jacobian you would do. 
     133 
     134             sage: T.jacobian = my_jacobian     # not tested, since it doesn't make sense to test this 
    131135 
    132136          
     
    144148         The default algorithm if rkf45. If you instead wanted to use bsimp you would do 
    145149 
    146          sage: T.algorithm="bsimp" 
     150            sage: T.algorithm="bsimp" 
    147151 
    148152         The user should supply initial conditions in y_0. For example 
    149153         if your initial conditions are y_0=1,y_1=1, do 
    150154 
    151          sage: T.y_0=[1,1] 
     155            sage: T.y_0=[1,1] 
    152156 
    153157         The actual solver is invoked by the method ode_solve. 
     
    182186         This data is stored in the variable solutions 
    183187          
    184          sage.: T.solution 
     188             sage: T.solution               # not tested 
    185189 
    186190         Examples: 
     
    265269                 return GSL_SUCCESS 
    266270 
    267          After executing the above block of code you can do the following (WARNING: this is 
    268          *not* automatically doctested): 
    269  
    270          sage.: T=ode_solver() 
    271          sage.: T.algorithm="bsimp" 
    272          sage.: vander = van_der_pol() 
    273          sage.: T.function=vander 
    274          sage.: T.ode_solve(y_0=[1,0],t_span=[0,2000],num_points=1000) 
    275          sage.: T.plot_solution(i=0, filename='sage.png') 
     271         After executing the above block of code you can do the 
     272         following (WARNING: the following is *not* automatically 
     273         doctested): 
     274 
     275         sage: T = ode_solver()                     # not tested 
     276         sage: T.algorithm = "bsimp"                # not tested 
     277         sage: vander = van_der_pol()               # not tested 
     278         sage: T.function=vander                    # not tested 
     279         sage: T.ode_solve(y_0 = [1,0], t_span=[0,2000], num_points=1000)   # not tested 
     280         sage: T.plot_solution(i=0, filename=SAGE_TMP + '/test.png')        # not tested 
    276281 
    277282    
  • sage/interfaces/matlab.py

    r6999 r7000  
    302302     
    303303    EXAMPLES: 
    304         sage.: matlab_console()                               # optional 
     304        sage: matlab_console()                               # optional and not tested 
    305305                                       < M A T L A B > 
    306306                           Copyright 1984-2006 The MathWorks, Inc. 
  • sage/interfaces/maxima.py

    r6878 r7000  
    248248You can plot 3d graphs (via gnuplot): 
    249249 
    250     sage.: maxima('plot3d(x^2-y^2, [x,-2,2], [y,-2,2], [grid,12,12])') 
     250    sage: maxima('plot3d(x^2-y^2, [x,-2,2], [y,-2,2], [grid,12,12])')  # not tested 
    251251    [displays a 3 dimensional graph] 
    252252 
     
    833833 
    834834        EXAMPLES: 
    835             sage.: maxima.plot2d('sin(x)','[x,-5,5]')  
    836             sage.: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-plot.eps"]' 
    837             sage.: maxima.plot2d('sin(x)','[x,-5,5]',opts)  
     835            sage: maxima.plot2d('sin(x)','[x,-5,5]')   # not tested 
     836            sage: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-plot.eps"]' 
     837            sage: maxima.plot2d('sin(x)','[x,-5,5]',opts)    # not tested 
    838838 
    839839        The eps file is saved in the current directory. 
     
    853853 
    854854        EXAMPLES: 
    855             sage.: maxima.plot2d_parametric(["sin(t)","cos(t)"], "t",[-3.1,3.1]) 
    856  
    857             sage.: opts = '[gnuplot_preamble, "set nokey"], [gnuplot_term, ps], [gnuplot_out_file, "circle-plot.eps"]' 
    858             sage.: maxima.plot2d_parametric(["sin(t)","cos(t)"], "t", [-3.1,3.1], options=opts) 
     855            sage: maxima.plot2d_parametric(["sin(t)","cos(t)"], "t",[-3.1,3.1])   # not tested 
     856 
     857            sage: opts = '[gnuplot_preamble, "set nokey"], [gnuplot_term, ps], [gnuplot_out_file, "circle-plot.eps"]' 
     858            sage: maxima.plot2d_parametric(["sin(t)","cos(t)"], "t", [-3.1,3.1], options=opts)   # not tested 
    859859             
    860860        The eps file is saved to the current working directory. 
    861861 
    862862        Here is another fun plot: 
    863             sage.: maxima.plot2d_parametric(["sin(5*t)","cos(11*t)"], "t", [0,2*pi()], nticks=400)  
     863            sage: maxima.plot2d_parametric(["sin(5*t)","cos(11*t)"], "t", [0,2*pi()], nticks=400)    # not tested 
    864864        """ 
    865865        tmin = trange[0] 
     
    884884 
    885885        EXAMPLES: 
    886             sage.: maxima.plot3d('1 + x^3 - y^2', '[x,-2,2]', '[y,-2,2]', '[grid,12,12]')  
    887             sage.: maxima.plot3d('sin(x)*cos(y)', '[x,-2,2]', '[y,-2,2]', '[grid,30,30]') 
    888             sage.: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-plot.eps"]'  
    889             sage.: maxima.plot3d('sin(x+y)', '[x,-5,5]', '[y,-1,1]', opts) 
     886            sage: maxima.plot3d('1 + x^3 - y^2', '[x,-2,2]', '[y,-2,2]', '[grid,12,12]')    # not tested 
     887            sage: maxima.plot3d('sin(x)*cos(y)', '[x,-2,2]', '[y,-2,2]', '[grid,30,30]')   # not tested 
     888            sage: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-plot.eps"]'  
     889            sage: maxima.plot3d('sin(x+y)', '[x,-5,5]', '[y,-1,1]', opts)    # not tested 
    890890 
    891891        The eps file is saved in the current working directory. 
     
    910910 
    911911        EXAMPLES: 
    912             sage.: maxima.plot3d_parametric(["v*sin(u)","v*cos(u)","v"], ["u","v"],[-3.2,3.2],[0,3]) 
    913             sage.: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-cos-plot.eps"]' 
    914             sage.: maxima.plot3d_parametric(["v*sin(u)","v*cos(u)","v"], ["u","v"],[-3.2,3.2],[0,3],opts) 
     912            sage: maxima.plot3d_parametric(["v*sin(u)","v*cos(u)","v"], ["u","v"],[-3.2,3.2],[0,3])     # not tested 
     913            sage: opts = '[gnuplot_term, ps], [gnuplot_out_file, "sin-cos-plot.eps"]' 
     914            sage: maxima.plot3d_parametric(["v*sin(u)","v*cos(u)","v"], ["u","v"],[-3.2,3.2],[0,3],opts)      # not tested 
    915915 
    916916        The eps file is saved in the current working directory. 
     
    918918        Here is a torus: 
    919919 
    920             sage.: _ = maxima.eval("expr_1: cos(y)*(10.0+6*cos(x)); expr_2: sin(y)*(10.0+6*cos(x)); expr_3: -6*sin(x);")  # optional 
    921             sage.: maxima.plot3d_parametric(["expr_1","expr_2","expr_3"], ["x","y"],[0,6],[0,6]) 
     920            sage: _ = maxima.eval("expr_1: cos(y)*(10.0+6*cos(x)); expr_2: sin(y)*(10.0+6*cos(x)); expr_3: -6*sin(x);")  # optional 
     921            sage: maxima.plot3d_parametric(["expr_1","expr_2","expr_3"], ["x","y"],[0,6],[0,6])   # not tested 
    922922 
    923923        Here is a Mobius strip: 
    924             sage.: x = "cos(u)*(3 + v*cos(u/2))" 
    925             sage.: y = "sin(u)*(3 + v*cos(u/2))" 
    926             sage.: z = "v*sin(u/2)" 
    927             sage.: maxima.plot3d_parametric([x,y,z],["u","v"],[-3.1,3.2],[-1/10,1/10]) 
     924            sage: x = "cos(u)*(3 + v*cos(u/2))" 
     925            sage: y = "sin(u)*(3 + v*cos(u/2))" 
     926            sage: z = "v*sin(u/2)" 
     927            sage: maxima.plot3d_parametric([x,y,z],["u","v"],[-3.1,3.2],[-1/10,1/10])   # not tested 
    928928        """ 
    929929        umin = urange[0] 
     
    10961096            sage: zeta_ptsx = [ (pari(1/2 + i*I/10).zeta().real()).precision(1) for i in range (70,150)]   
    10971097            sage: zeta_ptsy = [ (pari(1/2 + i*I/10).zeta().imag()).precision(1) for i in range (70,150)]   
    1098             sage.: maxima.plot_list(zeta_ptsx, zeta_ptsy)                    
    1099             sage.: opts='[gnuplot_preamble, "set nokey"], [gnuplot_term, ps], [gnuplot_out_file, "zeta.eps"]' 
    1100             sage.: maxima.plot_list(zeta_ptsx, zeta_ptsy, opts)              
     1098            sage: maxima.plot_list(zeta_ptsx, zeta_ptsy)         # not tested 
     1099            sage: opts='[gnuplot_preamble, "set nokey"], [gnuplot_term, ps], [gnuplot_out_file, "zeta.eps"]' 
     1100            sage: maxima.plot_list(zeta_ptsx, zeta_ptsy, opts)      # not tested 
    11011101        """ 
    11021102        cmd = 'plot2d([discrete,%s, %s]'%(ptsx, ptsy) 
     
    11201120 
    11211121        EXAMPLES: 
    1122             sage.: xx = [ i/10.0 for i in range (-10,10)] 
    1123             sage.: yy = [ i/10.0 for i in range (-10,10)] 
    1124             sage.: x0 = [ 0 for i in range (-10,10)] 
    1125             sage.: y0 = [ 0 for i in range (-10,10)] 
    1126             sage.: zeta_ptsx1 = [ (pari(1/2+i*I/10).zeta().real()).precision(1) for i in range (10)] 
    1127             sage.: zeta_ptsy1 = [ (pari(1/2+i*I/10).zeta().imag()).precision(1) for i in range (10)] 
    1128             sage.: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]])     
    1129             sage.: zeta_ptsx1 = [ (pari(1/2+i*I/10).zeta().real()).precision(1) for i in range (10,150)] 
    1130             sage.: zeta_ptsy1 = [ (pari(1/2+i*I/10).zeta().imag()).precision(1) for i in range (10,150)] 
    1131             sage.: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]])     
    1132             sage.: opts='[gnuplot_preamble, "set nokey"]'                  
    1133             sage.: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]],opts)   
     1122            sage: xx = [ i/10.0 for i in range (-10,10)] 
     1123            sage: yy = [ i/10.0 for i in range (-10,10)] 
     1124            sage: x0 = [ 0 for i in range (-10,10)] 
     1125            sage: y0 = [ 0 for i in range (-10,10)] 
     1126            sage: zeta_ptsx1 = [ (pari(1/2+i*I/10).zeta().real()).precision(1) for i in range (10)] 
     1127            sage: zeta_ptsy1 = [ (pari(1/2+i*I/10).zeta().imag()).precision(1) for i in range (10)] 
     1128            sage: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]])       # not tested 
     1129            sage: zeta_ptsx1 = [ (pari(1/2+i*I/10).zeta().real()).precision(1) for i in range (10,150)] 
     1130            sage: zeta_ptsy1 = [ (pari(1/2+i*I/10).zeta().imag()).precision(1) for i in range (10,150)] 
     1131            sage: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]])      # not tested 
     1132            sage: opts='[gnuplot_preamble, "set nokey"]'                  
     1133            sage: maxima.plot_multilist([[zeta_ptsx1,zeta_ptsy1],[xx,y0],[x0,yy]],opts)    # not tested 
    11341134        """ 
    11351135        n = len(pts_list) 
  • sage/interfaces/octave.py

    r6999 r7000  
    352352 
    353353        EXAMPLES: 
    354            sage.: octave.de_system_plot(['x+y','x-y'], [1,-1], [0,2]) 
    355  
    356         This yields the two plots $(t,x(t)), (t,y(t))$ on the same graph 
     354           sage: octave.de_system_plot(['x+y','x-y'], [1,-1], [0,2])  # not tested -- does this actually work (on OS X it fails for me -- William Stein, 2007-10) 
     355            
     356        This should yield the two plots $(t,x(t)), (t,y(t))$ on the same graph 
    357357        (the $t$-axis is the horizonal axis) of the system of ODEs 
    358358        $$ 
     
    418418     
    419419    EXAMPLES: 
    420         sage.: octave_console() 
     420        sage: octave_console()         # not tested 
    421421        GNU Octave, version 2.1.73 (i386-apple-darwin8.5.3). 
    422422        Copyright (C) 2006 John W. Eaton. 
  • sage/interfaces/phc.py

    r6980 r7000  
    1 r"""nodoctest 
     1r""" 
    22Interface to PHC. 
    33 
     
    1616 
    1717TODO: 
    18     This either needs to be able to handle arbitrary PHCpack command options, or have 
    19     enough special purpose functions added to get the full functionality.  One important  
    20     missing special case is having a root-counting function that could do mixed volumes and  
    21     structured Bezout counts. 
    22     Another nice feature to have would be a graphical output of the path-tracking, as has been done for Maple. 
     18    This either needs to be able to handle arbitrary PHCpack command 
     19    options, or have enough special purpose functions added to get the 
     20    full functionality.  One important missing special case is having 
     21    a root-counting function that could do mixed volumes and 
     22    structured Bezout counts.  Another nice feature to have would be a 
     23    graphical output of the path-tracking, as has been done for Maple. 
    2324""" 
    2425 
     
    4344def get_solution_dicts(output_file_contents, input_ring, get_failures = True): 
    4445    ''' 
    45     Returns a list of dictionaries of variable:value (key:value) pairs.   
    46     Only used internally; see the solution_dict function in the PHC_Object class definition for details. 
     46    Returns a list of dictionaries of variable:value (key:value) 
     47    pairs.  Only used internally; see the solution_dict function in 
     48    the PHC_Object class definition for details. 
    4749    ''' 
    4850    output_list = output_file_contents.splitlines() 
     
    8486class PHC_Object: 
    8587    """ 
    86     A container for data from the PHCpack program - lists of float solutions, etc. 
     88    A container for data from the PHCpack program - lists of float 
     89    solutions, etc. 
    8790    """ 
    8891    def __init__(self, output_file_contents, input_ring): 
     
    100103 
    101104        INPUT: 
    102             self: for access to self_out_file_contents, the string of raw PHCpack output. 
    103             get_failures (optional): a boolean.  The default (False) is to not process failed homotopies.  These either lie on positive-dimensional components or at infinity. 
    104  
    105         OUTPUT: 
    106             solution_dicts: a list of dictionaries.  Each dictionary element is of the form variable:value, where the variable is an element of the input_ring, and the value is in ComplexField. 
     105            self -- for access to self_out_file_contents, the string 
     106            of raw PHCpack output. 
     107 
     108            get_failures (optional) -- a boolean.  The default (False) 
     109            is to not process failed homotopies.  These either lie on 
     110            positive-dimensional components or at infinity. 
     111 
     112        OUTPUT: 
     113 
     114            solution_dicts: a list of dictionaries.  Each dictionary 
     115            element is of the form variable:value, where the variable 
     116            is an element of the input_ring, and the value is in 
     117            ComplexField. 
    107118         
    108119        """ 
     
    120131 
    121132        INPUT: 
    122             self: for access to self_out_file_contents, the string of raw PHCpack output. 
    123             get_failures (optional): a boolean.  The default (False) is to not process failed homotopies.  These either lie on positive-dimensional components or at infinity. 
     133            self -- for access to self_out_file_contents, the string 
     134            of raw PHCpack output. 
     135            get_failures (optional) -- a boolean.  The default (False) 
     136            is to not process failed homotopies.  These either lie on 
     137            positive-dimensional components or at infinity. 
    124138 
    125139        OUTPUT: 
     
    138152    def variable_list(self): 
    139153        """ 
    140         Returns the variables, as strings, in the order in which PHCpack has processed them. 
     154        Returns the variables, as strings, in the order in which 
     155        PHCpack has processed them. 
    141156        """ 
    142157        try: 
     
    150165class PHC: 
    151166    """ 
    152     A class to interface with PHCpack, for computing numerical homotopies and root counts. 
     167    A class to interface with PHCpack, for computing numerical 
     168    homotopies and root counts. 
    153169 
    154170    EXAMPLES: 
    155171        sage: from sage.interfaces.phc import phc 
    156         sage: R.<x,y> = PolynomialRing(QQ,2) 
     172        sage: R.<x,y> = PolynomialRing(CDF,2) 
    157173        sage: testsys = [x^2 + 1, x*y - 1]  
    158174        sage: v = phc.blackbox(testsys, R)     # optional -- you must have phc install 
    159175        sage: v.solutions() 
    160         [[1.00000000000000*I, -1.00000000000000*I], [-1.00000000000000*I, 1.00000000000000*I]] 
     176        [[-1.00000000000000*I, 1.00000000000000*I], [1.00000000000000*I, -1.00000000000000*I]] 
    161177        sage: v.solution_dicts() 
    162         [{y: 1.00000000000000*I, x: -1.00000000000000*I}, {y: -1.00000000000000*I, x: 1.00000000000000*I}] 
    163         sage: residuals = [[test_equation.subs(sol) for test_equation in testsys] for sol in v.solution_dicts()] 
     178        [{x: -1.00000000000000*I, y: 1.00000000000000*I}, {x: 1.00000000000000*I, y: -1.00000000000000*I}] 
     179        sage: residuals = [[test_equation.change_ring(CDF).subs(sol) for test_equation in testsys] for sol in v.solution_dicts()] 
    164180        sage: residuals 
    165181        [[0, 0], [0, 0]] 
    166         sage: print v  
    167          2 
    168         x^2+ 1; 
    169         x*y-1; 
    170         <BLANKLINE> 
    171         THE SOLUTIONS : 
    172         <BLANKLINE> 
    173         2 2 
    174         =========================================================================== 
    175         solution 1 :    start residual :  1.225E-16   #iterations : 1   success 
    176         t :  0.00000000000000E+00   0.00000000000000E+00 
    177         m : 1 
    178         the solution for t : 
    179          x :  0.00000000000000E+00  -1.00000000000000E+00 
    180          y :  0.00000000000000E+00   1.00000000000000E+00 
    181         == err :  1.225E-16 = rco :  3.333E-01 = res :  0.000E+00 = complex regular == 
    182         solution 2 :    start residual :  1.225E-16   #iterations : 1   success 
    183         t :  0.00000000000000E+00   0.00000000000000E+00 
    184         m : 1 
    185         the solution for t : 
    186          x :  0.00000000000000E+00   1.00000000000000E+00 
    187          y :  0.00000000000000E+00  -1.00000000000000E+00 
    188         == err :  1.225E-16 = rco :  3.333E-01 = res :  0.000E+00 = complex regular == 
    189         =========================================================================== 
    190         A list of 2 solutions has been refined : 
    191         Number of regular solutions   : 2. 
    192         Number of singular solutions  : 0. 
    193         Number of real solutions      : 0. 
    194         Number of complex solutions   : 2. 
    195         Number of clustered solutions : 0. 
    196         Number of failures            : 0. 
    197         =========================================================================== 
    198         Frequency tables for correction, residual, condition, and distances : 
    199         FreqCorr :  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 : 2 
    200         FreqResi :  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 : 2 
    201         FreqCond :  2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 2 
    202         FreqDist :  2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 : 2 
    203         Small correction terms and residuals counted to the right. 
    204         Well conditioned and distinct roots counted to the left. 
    205         <BLANKLINE> 
    206         TIMING INFORMATION for Solving the polynomial system 
    207         The elapsed time in seconds was                  0.013681000 =  0h 0m 0s 14ms 
    208         User time in seconds was                         0.011680000 =  0h 0m 0s 12ms 
    209         System CPU time in seconds was                   0.002001000 =  0h 0m 0s  2ms 
    210         Non-I/O page faults was                          0 
    211         I/O page faults was                              0 
    212         Signals delivered was                            0 
    213         Swaps was                                        0 
    214         Total context switches was                       0 
    215         <BLANKLINE> 
    216           --------------------------------------------------------------------- 
    217           |                    TIMING INFORMATION SUMMARY                     | 
    218           --------------------------------------------------------------------- 
    219           |   root counts  |  start system  |  continuation  |   total time   | 
    220           --------------------------------------------------------------------- 
    221           |  0h 0m 0s  0ms |  0h 0m 0s  0ms |  0h 0m 0s  0ms |  0h 0m 0s 12ms | 
    222           --------------------------------------------------------------------- 
    223         PHC ran from 3 July 2007, 11:33:02 till 3 July 2007, 11:33:02. 
    224         The total elapsed time is 0 seconds. 
    225         <BLANKLINE> 
    226182    """ 
    227183    def _input_file(self, polys): 
  • sage/interfaces/psage.py

    r4966 r7000  
    1 r"""nodoctest 
     1r""" 
    22Parallel Interface to the SAGE interpreter 
    33 
     
    2121Next, request factorization of one random integer in each copy. 
    2222 
    23     sage.: w = [x('factor(2^%s-1)'% randint(250,310)) for x in v] 
     23    sage: w = [x('factor(2^%s-1)'% randint(250,310)) for x in v] 
    2424 
    2525Print the status: 
    26     sage.: w 
     26    sage: w       # random output (depends on timing) 
    2727    [3 * 11 * 31^2 * 311 * 11161 * 11471 * 73471 * 715827883 * 2147483647 * 4649919401 * 18158209813151 * 5947603221397891 * 29126056043168521, 
    2828     <<currently executing code>>, 
     
    3333finished: 
    3434 
    35     sage.: w 
     35    sage: w       # random output 
    3636    [3 * 11 * 31^2 * 311 * 11161 * 11471 * 73471 * 715827883 * 2147483647 * 4649919401 * 18158209813151 * 5947603221397891 * 29126056043168521, 
    3737     23^2 * 47 * 89 * 178481 * 4103188409 * 199957736328435366769577 * 44667711762797798403039426178361, 
  • sage/interfaces/qsieve.py

    r4331 r7000  
    6464        sage: v                                          # optional 
    6565        [10000000000000000051, 100000000000000000039] 
    66         sage.: t 
     66        sage: t                                          # random and optional 
    6767        '0.36 real         0.19 user         0.00 sys' 
    6868    """ 
     
    142142        sage: k = 19; n = next_prime(10^k)*next_prime(10^(k+1)) 
    143143        sage: q = qsieve(n, block=False, time=True)           # optional -- requires time command 
    144         sage.: q           # random output                     # optional 
     144        sage: q           # random output                     # optional 
    145145        Proper factors so far: []   
    146         sage.: q           # random output                     # optional 
     146        sage: q           # random output                     # optional 
    147147        ([10000000000000000051, 100000000000000000039], '0.21') 
    148         sage.: q.list()    # random output                     # optional 
     148        sage: q.list()    # random output                     # optional 
    149149        [10000000000000000051, 100000000000000000039] 
    150         sage.: q.time()    # random output     (optional -- requires time command) 
     150        sage: q.time()    # random output     (optional -- requires time command) 
    151151        '0.21' 
    152152 
  • sage/interfaces/singular.py

    r6952 r7000  
    199199            //        block   2 : ordering C 
    200200    sage: I = singular.ideal('cyclic(6)') 
    201     sage.: g = singular('groebner(I)')              
     201    sage: g = singular('groebner(I)')              
    202202    Traceback (most recent call last): 
    203203    ... 
    204204    TypeError: Singular error: 
    205        ? `I` is undefined 
    206        ? error occurred in standard.lib::groebner line 164: `parameter def i; parameter  list #;  ` 
    207        ? leaving standard.lib::groebner 
    208        skipping text from `;` error at token `)` 
    209     sage.: g = I.groebner()             # not tested since crashes doctest system 
    210     sage.: g 
    211        f^48-2554*f^42-15674*f^36+12326*f^30-12326*f^18+15674*f^12+2554*f^6-1, 
    212        ... 
     205    ... 
     206 
     207We restart everything and try again, but correctly. 
     208    sage: singular.quit() 
     209    sage: singular.lib('poly.lib'); R = singular.ring(32003, '(a,b,c,d,e,f)', 'lp') 
     210    sage: I = singular.ideal('cyclic(6)') 
     211    sage: I.groebner()      
     212    f^48-2554*f^42-15674*f^36+12326*f^30-12326*f^18+15674*f^12+2554*f^6-1, 
     213    ... 
    213214 
    214215It's important to understand why the first attempt at computing a 
  • sage/lfunctions/sympow.py

    r2319 r7000  
    102102 
    103103        EXAMPLES: 
    104             sage.: a = sympow.L(EllipticCurve('11a'), 2, 16); a 
     104            sage: a = sympow.L(EllipticCurve('11a'), 2, 16); a   # not tested 
    105105            '1.057599244590958E+00' 
    106             sage.: RR(a) 
     106            sage: RR(a) 
    107107            1.0575992445909579 
    108108        """ 
     
    143143 
    144144        EXAMPLES: 
    145             sage.: print sympow.Lderivs(EllipticCurve('11a'), 1, 16, 2) 
     145            sage: print sympow.Lderivs(EllipticCurve('11a'), 1, 16, 2)  # not tested 
    146146            ... 
    147147             1n0: 2.538418608559107E-01 
  • sage/libs/hanke/hanke.pyx

    r0 r7000  
    732732            [ 0, 0, 0, 14 ] 
    733733 
    734             sage.: D.local_constant(3,10) 
     734            sage: D.local_constant(3,10)         # not tested 
    735735            '15/2' 
    736736             
    737             sage.: D.local_constant(3,30) 
     737            sage: D.local_constant(3,30)         # not tested 
    738738            '153/20' 
    739739 
  • sage/libs/mwrank/mwrank.pyx

    r1582 r7000  
    44    sage: c = _Curvedata(1,2,3,4,5) 
    55     
    6     sage.: print c 
     6    sage: print c 
    77    [1,2,3,4,5] 
    88    b2 = 9       b4 = 11         b6 = 29         b8 = 35 
     
    109109 
    110110    EXAMPLES: 
    111         sage.: mwrank_initprimes("PRIMES", True) 
    112         Computed 78519 primes, largest is 1000253 
    113         reading primes from file PRIMES 
    114         read extra prime 10000000019 
    115         finished reading primes from file PRIMES 
    116         Extra primes in list: 10000000019 
    117         sage.: mwrank_initprimes("PRIMES", False) 
    118          
    119         sage: mwrank_initprimes("xPRIMES", True) 
     111        sage: file= SAGE_TMP + '/PRIMES' 
     112        sage: open(file,'w').write(' '.join([str(p) for p in prime_range(10^6)])) 
     113        sage: mwrank_initprimes(file, verb=False) 
     114        sage: mwrank_initprimes("x" + file, True) 
    120115        Traceback (most recent call last): 
    121116        ... 
    122         IOError: No such file or directory: xPRIMES 
     117        IOError: No such file or directory: ... 
    123118    """ 
    124119    if not os.path.exists(filename): 
  • sage/libs/ntl/ntl_mat_ZZ.pyx

    r6990 r7000  
    382382        NTL isn't very good compared to MAGMA, unfortunately: 
    383383         
    384             sage.: import ntl 
    385             sage.: a=MatrixSpace(Q,200).random_element()    # -2 to 2 
    386             sage.: A=ntl.mat_ZZ(200,200) 
    387             sage.: for i in xrange(a.nrows()): 
    388                ....:     for j in xrange(a.ncols()): 
    389                ....:         A[i,j] = a[i,j] 
    390                ....: 
    391             sage.: time d=A.determinant() 
    392             Time.: 3.89 seconds 
    393             sage.: time B=A.HNF(d) 
    394             Time.: 27.59 seconds 
     384            sage: a = MatrixSpace(ZZ,200).random_element(x=-2, y=2)    # -2 to 2 
     385            sage: A = ntl.mat_ZZ(200,200) 
     386            sage: for i in xrange(a.nrows()): 
     387            ...     for j in xrange(a.ncols()): 
     388            ...         A[i,j] = a[i,j] 
     389            ... 
     390            sage: t = cputime(); d = A.determinant() 
     391            sage: cputime(t) 
     392            0.33201999999999998 
     393            sage: t = cputime(); B = A.HNF(d) 
     394            sage: cputime(t) 
     395            6.4924050000000006 
    395396 
    396397        In comparison, MAGMA does this much more quickly: 
    397398        \begin{verbatim} 
    398             > A := MatrixAlgebra(Z,200)![Random(-2,2) : i in [1..200^2]]; 
     399            > A := MatrixAlgebra(IntegerRing(),200)![Random(-2,2) : i in [1..200^2]]; 
    399400            > time d := Determinant(A); 
    400             Time: 0.710 
     401            Time: 0.140 
    401402            > time H := HermiteForm(A); 
    402             Time: 3.080 
     403            Time: 0.290 
    403404        \end{verbatim} 
    404405 
  • sage/modular/hecke/submodule.py

    r5510 r7000  
    314314            sage: A.dimension(), B.dimension() 
    315315            (2, 3) 
    316              
    317             sage.: C = A.intersection(B); C.dimension() 
     316            sage: C = A.intersection(B); C.dimension() 
    318317            1 
    319318        """ 
  • sage/modular/modform/ambient.py

    r6992 r7000  
    382382 
    383383        EXAMPLES: 
    384             sage.: m = ModularForms(Gamma0(33),2); m 
     384            sage: m = ModularForms(Gamma0(33),2); m    # TODO: not tested -- broken 
    385385            Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(33) of weight 2 over Rational Field 
    386             sage.: m.new_submodule() 
     386            sage: m.new_submodule()              # not tested -- broken 
    387387            Modular Forms subspace of dimension 1 of Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(33) of weight 2 over Rational Field 
    388388 
    389389        Another example: 
    390             sage.: M = ModularForms(17,4) 
    391             sage.: N = M.new_subspace(); N 
     390            sage: M = ModularForms(17,4) 
     391            sage: N = M.new_subspace(); N        # not tested -- broken 
    392392            Modular Forms subspace of dimension 4 of Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(17) of weight 4 over Rational Field 
    393             sage.: N.basis() 
     393            sage: N.basis()                      # not tested -- broken 
    394394            [ 
    395395            q + 2*q^5 + O(q^6), 
     
    406406 
    407407        Unfortunately (TODO) -- $p$-new submodules aren't yet implemented: 
    408             sage.: m.new_submodule(3) 
     408            sage: m.new_submodule(3)            # not tested -- broken 
    409409            Traceback (most recent call last): 
    410410            ... 
    411411            NotImplementedError 
    412             sage.: m.new_submodule(11) 
     412            sage: m.new_submodule(11)           # not tested -- broken 
    413413            Traceback (most recent call last): 
    414414            ... 
  • sage/modules/free_module.py

    r6606 r7000  
    12271227        EXAMPLES: 
    12281228            sage: M = FreeModule(ZZ, 2).span([[1,1]]) 
    1229             sage: x = M.random_element() 
    1230             sage.: x 
     1229            sage: M.random_element() 
    12311230            (1, 1) 
    1232             sage.: M.random_element() 
     1231            sage: M.random_element() 
    12331232            (-2, -2) 
    1234             sage.: M.random_element() 
     1233            sage: M.random_element() 
    12351234            (-1, -1) 
    12361235        """ 
  • sage/plot/plot3dsoya_wrap.py

    r1097 r7000  
    5555 
    5656    A periodic surface: 
    57         sage.: p = plot3dsoya(lambda x,y : sin(x)+cos(y), (0,0), 10)   # optional: requires soya3d 
     57        sage: p = plot3dsoya(lambda x,y : sin(x)+cos(y), (0,0), 10)   # optional: requires soya3d; not tested 
    5858 
    5959    Now use the show command to view the surface: 
    60         sage.: p.show() 
     60        sage: p.show()  # not tested 
    6161 
    6262    The Riemann Zeta function 
    63         sage.: p = plot3dsoya(lambda x,y : abs(zeta(x + y*I)), (0.5,5), 10, res=4) 
     63        sage: p = plot3dsoya(lambda x,y : abs(zeta(x + y*I)), (0.5,5), 10, res=4)  # not tested 
    6464     
    6565    """ 
  • sage/rings/integer.pyx

    r6988 r7000  
    6262    'sagesagesage' 
    6363 
    64 Coercions: 
     64COERCIONS: 
    6565    Returns version of this integer in the multi-precision floating 
    6666    real field R. 
    6767 
    68         sage: n = 9390823 
    69         sage: RR = RealField(200) 
    70         sage: RR(n) 
    71         9390823.0000000000000000000000000000000000000000000000000000 
     68    sage: n = 9390823 
     69    sage: RR = RealField(200) 
     70    sage: RR(n) 
     71    9390823.0000000000000000000000000000000000000000000000000000 
    7272 
    7373""" 
     
    19831983 
    19841984        EXAMPLES: 
    1985         sage: Integer(64).is_power_of(4) 
    1986         True 
    1987         sage: Integer(64).is_power_of(16) 
    1988         False 
     1985            sage: Integer(64).is_power_of(4) 
     1986            True 
     1987            sage: Integer(64).is_power_of(16) 
     1988            False 
    19891989 
    19901990        TESTS: 
    1991         sage: Integer(-64).is_power_of(-4) 
    1992         True 
    1993         sage: Integer(-32).is_power_of(-2) 
    1994         True 
    1995         sage: Integer(1).is_power_of(1) 
    1996         True 
    1997         sage: Integer(-1).is_power_of(-1) 
    1998         True 
    1999         sage: Integer(0).is_power_of(1) 
    2000         False 
    2001         sage: Integer(0).is_power_of(0) 
    2002         True 
    2003         sage: Integer(1).is_power_of(0) 
    2004         True 
    2005         sage: Integer(1).is_power_of(8) 
    2006         True 
    2007         sage: Integer(-8).is_power_of(2) 
    2008         False 
     1991         
     1992            sage: Integer(-64).is_power_of(-4) 
     1993            True 
     1994            sage: Integer(-32).is_power_of(-2) 
     1995            True 
     1996            sage: Integer(1).is_power_of(1) 
     1997            True 
     1998            sage: Integer(-1).is_power_of(-1) 
     1999            True 
     2000            sage: Integer(0).is_power_of(1) 
     2001            False 
     2002            sage: Integer(0).is_power_of(0) 
     2003            True 
     2004            sage: Integer(1).is_power_of(0) 
     2005            True 
     2006            sage: Integer(1).is_power_of(8) 
     2007            True 
     2008            sage: Integer(-8).is_power_of(2) 
     2009            False 
    20092010 
    20102011        NOTES: 
    2011         For large integers self, is_power_of() is faster than is_power().  The following examples gives some indication of how much faster. 
    2012         sage.: b = lcm(range(1,10000)) 
    2013         sage.: b.exact_log(2) 
    2014         14446 
    2015         sage.: time for a in range(2, 1000): k = b.is_power() 
    2016         CPU times: user 1.68 s, sys: 0.01 s, total: 1.69 s 
    2017         Wall time: 1.71 
    2018         sage.: time for a in range(2, 1000): k = b.is_power_of(2) 
    2019         CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s 
    2020         Wall time: 0.01 
    2021         sage.: time for a in range(2, 1000): k = b.is_power_of(3) 
    2022         CPU times: user 0.05 s, sys: 0.00 s, total: 0.05 s 
    2023         Wall time: 0.05 
    2024  
    2025         sage.: b = lcm(range(1, 1000)) 
    2026         sage.: b.exact_log(2) 
    2027         1437 
    2028         sage.: time for a in range(2, 10000): k = b.is_power() # note that we change the range from the example above 
    2029         CPU times: user 0.40 s, sys: 0.00 s, total: 0.40 s 
    2030         Wall time: 0.40 
    2031         sage.: for a in range(2, 10000): k = b.is_power_of(TWO) 
    2032         CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s 
    2033         Wall time: 0.03 
    2034         sage.: time for a in range(2, 10000): k = b.is_power_of(3) 
    2035         CPU times: user 0.11 s, sys: 0.01 s, total: 0.12 s 
    2036         Wall time: 0.13 
    2037         sage.: time for a in range(2, 10000): k = b.is_power_of(a) 
    2038         CPU times: user 0.08 s, sys: 0.01 s, total: 0.09 s 
    2039         Wall time: 0.10 
     2012 
     2013        For large integers self, is_power_of() is faster than is_power(). 
     2014        The following examples gives some indication of how much faster. 
     2015         
     2016            sage: b = lcm(range(1,10000)) 
     2017            sage: b.exact_log(2) 
     2018            14446 
     2019            sage: t=cputime() 
     2020            sage: for a in range(2, 1000): k = b.is_power() 
     2021            sage: cputime(t)      # random 
     2022            0.53203299999999976  
     2023            sage: t=cputime() 
     2024            sage: for a in range(2, 1000): k = b.is_power_of(2) 
     2025            sage: cputime(t)      # random 
     2026            0.0 
     2027            sage: t=cputime() 
     2028            sage: for a in range(2, 1000): k = b.is_power_of(3) 
     2029            sage: cputime(t)      # random 
     2030            0.032002000000000308 
     2031 
     2032            sage: b = lcm(range(1, 1000)) 
     2033            sage: b.exact_log(2) 
     2034            1437 
     2035            sage: t=cputime() 
     2036            sage: for a in range(2, 10000): k = b.is_power() # note that we change the range from the example above 
     2037            sage: cputime(t)      # random 
     2038            0.17201100000000036  
     2039            sage: t=cputime(); TWO=int(2) 
     2040            sage: for a in range(2, 10000): k = b.is_power_of(TWO) 
     2041            sage: cputime(t)      # random 
     2042            0.0040000000000000036 
     2043            sage: t=cputime() 
     2044            sage: for a in range(2, 10000): k = b.is_power_of(3) 
     2045            sage: cputime(t)      # random 
     2046            0.040003000000000011 
     2047            sage: t=cputime() 
     2048            sage: for a in range(2, 10000): k = b.is_power_of(a) 
     2049            sage: cputime(t)      # random 
     2050            0.02800199999999986 
    20402051        """ 
    20412052        if not PY_TYPE_CHECK(n, Integer): 
  • sage/rings/padics/factory.py

    r5872 r7000  
    224224       sage: Zp(17, 5)(-1) 
    225225       16 + 16*17 + 16*17^2 + 16*17^3 + 16*17^4 + O(17^5) 
    226        sage.: Zp(next_prime(10^50), 10000) 
    227        100000000000000000000000000000000000000000000000151-adic Ring with capped relative precision 10000 
     226       sage: Zp(next_prime(10^50), 1000) 
     227       100000000000000000000000000000000000000000000000151-adic Ring with capped relative precision 1000 
    228228 
    229229    We create each type of ring: 
     
    387387            raise TypeError, "modulus must be a polynomial" 
    388388        if not isinstance(names, str): 
    389             raise TypeError, "names must be a string" 
     389            names = str(names) 
     390            #raise TypeError, "names must be a string" 
    390391        if not isinstance(halt, (int, long, Integer)): 
    391392            raise TypeError, "halt must be an integer" 
  • sage/rings/padics/tutorial.py

    r4450 r7000  
    353353 
    354354 
    355 sage: R.<c> = Zq(125, prec = 20) 
    356 sage.: R 
    357 Unramified Extension of 5-adic Ring with capped absolute precision 20 in c 
    358 defined by (1 + O(5^20))*x^3 + O(5^20)*x^2 + (3 + O(5^20))*x + 3 + O(5^20) 
    359  
    360  
    361 \section{New Versions of the $p$-adics} 
    362  
    363 The code for $p$-adics is fairly rapidly changing.  If there's a bug 
    364 you want fixed, let me know and I'll try to fix it.  Once I do, you'll 
    365 need to get the latest version of $p$-adics with the bug fixed.  If 
    366 you don't want to wait for the next version of SAGE to come out, you 
    367 can do the following to get the most recent version: 
    368  
    369  
    370 sage.: hg_sage.pull() 
    371 sage.: hg_sage.apply('http://sage.math.washington.edu/home/padicgroup/development-version.hg') 
    372 sage.: quit 
    373 localhost:~$ sage 
    374 sage.: run code that generated bug. 
    375  
    376 If you want a slightly more stable but older version, use \verb/semistable-version.hg/ instead. 
     355    sage: R.<c> = Zq(125, prec = 20); R 
     356    Unramified Extension of 5-adic Ring with capped absolute precision 20 
     357    in c defined by (1 + O(5^20))*x^3 + (3 + O(5^20))*x + (3 + O(5^20)) 
    377358""" 
  • sage/rings/polynomial/groebner_fan.py

    r6606 r7000  
    407407            sage: R.<x,y> = PolynomialRing(QQ,2) 
    408408            sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan() 
    409             sage: G.render('a.fig') 
     409            sage: G.render(SAGE_TMP + '/test.fig') 
    410410 
    411411            sage: R.<x,y,z> = PolynomialRing(QQ,3) 
    412412            sage: G = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y]).groebner_fan() 
    413             sage.: G.render('a.fig', show=True, larger=True) 
     413            sage: G.render(SAGE_TMP + '/test.fig', show=False, larger=True) 
    414414        """ 
    415415        cmd = 'render' 
     
    584584            sage: R.<x,y> = PolynomialRing(QQ,2) 
    585585            sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan() 
    586             sage.: G[0].interactive() 
     586            sage: G[0].interactive()      # not tested 
    587587            Initializing gfan interactive mode 
    588588            ********************************************* 
  • sage/rings/polynomial/multi_polynomial_ideal.py

    r6920 r7000  
    268268            sage: R.<x,y> = PolynomialRing(QQ,2) 
    269269            sage: I = R.ideal([y^3 - x^2]) 
    270             sage.: I.plot()        # cusp         (optional surf) 
     270            sage: I.plot()        # cusp         (optional surf) 
    271271            sage: I = R.ideal([y^2 - x^2 - 1]) 
    272             sage.: I.plot()        # hyperbola    (optional surf) 
     272            sage: I.plot()        # hyperbola    (optional surf) 
    273273            sage: I = R.ideal([y^2 + x^2*(1/4) - 1]) 
    274             sage.: I.plot()        # ellipse      (optional surf) 
     274            sage: I.plot()        # ellipse      (optional surf) 
    275275            sage: I = R.ideal([y^2-(x^2-1)*(x-2)]) 
    276             sage.: I.plot()        # elliptic curve  (optional surf) 
     276            sage: I.plot()        # elliptic curve  (optional surf) 
    277277 
    278278        Implicit plotting in 3-d: 
    279279            sage: R.<x,y,z> = PolynomialRing(QQ,3) 
    280280            sage: I = R.ideal([y^2 + x^2*(1/4) - z]) 
    281             sage.: I.plot()          # a cone         (optional surf) 
     281            sage: I.plot()          # a cone         (optional surf) 
    282282            sage: I = R.ideal([y^2 + z^2*(1/4) - x]) 
    283             sage.: I.plot()          # same code, from a different angle  (optional surf) 
     283            sage: I.plot()          # same code, from a different angle  (optional surf) 
    284284            sage: I = R.ideal([x^2*y^2+x^2*z^2+y^2*z^2-16*x*y*z]) 
    285             sage.: I.plot()          # Steiner surface   (optional surf) 
     285            sage: I.plot()          # Steiner surface   (optional surf) 
    286286 
    287287        AUTHOR: 
  • sage/rings/polynomial/multi_polynomial_ring.py

    r6606 r7000  
    152152        sage: R = MPolynomialRing(Integers(12), 'x', 5); R 
    153153        Multivariate Polynomial Ring in x0, x1, x2, x3, x4 over Ring of integers modulo 12 
    154         sage.: loads(R.dumps()) == R     # TODO -- this currently hangs sometimes (??) 
     154        sage: loads(R.dumps()) == R     
    155155        True 
    156156    """ 
  • sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py

    r6844 r7000  
    833833 
    834834        EXAMPLES: 
    835         sage.: K = Zp(13, 5) 
    836         sage.: R.<t> = K[] 
    837         sage.: f = t^3 + K(13, 3) * t 
    838         sage.: f.rescale(2) 
     835            sage: K = Zp(13, 5) 
     836            sage: R.<t> = K[] 
     837            sage: f = t^3 + K(13, 3) * t 
     838            sage: f.rescale(2)    # todo: not tested -- in fact, is broken! 
    839839        """ 
    840840        negval = False 
  • sage/rings/polynomial/polynomial_element_generic.py

    r6990 r7000  
    875875            sage: R.<x> = QQ[] 
    876876            sage: f = x^3 - 2 
    877             sage.: f.factor_padic(2) 
    878             (1 + O(2^10))*x^3 + O(2^10)*x^2 + O(2^10)*x + (2 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + O(2^10)) 
    879             sage.: f.factor_padic(3) 
    880             (1 + O(3^10))*x^3 + O(3^10)*x^2 + O(3^10)*x + (1 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + O(3^10)) 
    881             sage.: f.factor_padic(5) 
     877            sage: f.factor_padic(2) 
     878            (1 + O(2^10))*x^3 + (O(2^10))*x^2 + (O(2^10))*x + (2 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + O(2^10)) 
     879            sage: f.factor_padic(3) 
     880            (1 + O(3^10))*x^3 + (O(3^10))*x^2 + (O(3^10))*x + (1 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + O(3^10)) 
     881            sage: f.factor_padic(5) 
    882882            ((1 + O(5^10))*x + (2 + 4*5 + 2*5^2 + 2*5^3 + 5^4 + 3*5^5 + 4*5^7 + 2*5^8 + 5^9 + O(5^10))) * ((1 + O(5^10))*x^2 + (3 + 2*5^2 + 2*5^3 + 3*5^4 + 5^5 + 4*5^6 + 2*5^8 + 3*5^9 + O(5^10))*x + (4 + 5 + 2*5^2 + 4*5^3 + 4*5^4 + 3*5^5 + 3*5^6 + 4*5^7 + 4*5^9 + O(5^10))) 
    883883        """ 
     
    891891        K = Qp(p, prec, type='capped-rel') 
    892892        R = sage.rings.polynomial.polynomial_ring.PolynomialRing(K, names=self.parent().variable_name()) 
    893         return R(self).factor(absprec = prec) 
     893        return R(self).factor() # absprec = prec) 
    894894 
    895895    def list(self): 
  • sage/rings/power_series_ring.py

    r5590 r7000  
    279279            sage: latex(R) 
    280280            \mathbf{F}_{17}[[y]] 
    281             sage.: view(R)            # display typeset form 
    282         """ 
    283          
     281        """ 
    284282        return "%s[[%s]]"%(latex.latex(self.base_ring()), self.variable_name()) 
    285283 
  • sage/rings/ring.pyx

    r6990 r7000  
    14801480 
    14811481        EXAMPLES: 
    1482             sage.: k = GF(2^10, 'a') 
    1483             sage.: k.random_element() 
     1482            sage: k = GF(2^10, 'a') 
     1483            sage: k.random_element()       
    14841484            a^9 + a 
    14851485        """ 
  • sage/schemes/elliptic_curves/constructor.py

    r6606 r7000  
    182182    curve with Cremona label 27a1: 
    183183     
    184         sage.: E = EllipticCurve_from_cubic('x^3 + y^3 + z^3', [1,-1,0]) 
    185         sage.: print E 
     184        sage: E = EllipticCurve_from_cubic('x^3 + y^3 + z^3', [1,-1,0])  # optional -- requires magma 
     185        sage: E         # optional 
    186186        Elliptic Curve defined by y^2 + y = x^3 - 7 over Rational Field 
    187         sage.: E.cremona_label() 
     187        sage: E.cremona_label()     # optional 
    188188        '27a1' 
    189189 
    190190    Next we find the minimal model and conductor of the Jacobian 
    191191    of the Selmer curve.  
    192         sage.: E = EllipticCurve_from_cubic('x^3 + y^3 + 60*z^3', [1,-1,0]) 
    193         sage.: print E 
     192        sage: E = EllipticCurve_from_cubic('x^3 + y^3 + 60*z^3', [1,-1,0])   # optional 
     193        sage: E            # optional 
    194194        Elliptic Curve defined by y^2  = x^3 - 24300 over Rational Field 
    195         sage.: E.conductor() 
     195        sage: E.conductor()    # optional 
    196196        24300 
    197197 
  • sage/schemes/elliptic_curves/ell_rational_field.py

    r6778 r7000  
    19361936            ...        LL.append(G) 
    19371937            ... 
    1938             sage.: graphs_list.show_graphs(LL) 
     1938            sage: graphs_list.show_graphs(LL) 
    19391939             
    19401940            sage: E = EllipticCurve('195a') 
  • sage/schemes/elliptic_curves/lseries_ell.py

    r6940 r7000  
    102102            sage: L(2) 
    103103            0.381575408260711 
    104             sage.: L = E.Lseries().dokchitser(algorithm='magma')         # optional  (not auto tested) 
    105             sage.: L.Evaluate(2)                                       # optional  (not auto tested) 
     104            sage: L = E.Lseries().dokchitser(algorithm='magma')         # optional   
     105            sage: L.Evaluate(2)                                     # optional 
    106106            0.38157540826071121129371040958008663667709753398892116 
    107107        """ 
     
    157157            '2.492262044273650E+00' 
    158158            sage: RR(a)                      # optional 
    159             2.4922620442736498 
     159            2.49226204427365 
    160160        """ 
    161161        from sage.lfunctions.sympow import sympow 
     
    182182        EXAMPLES: 
    183183            sage: E = EllipticCurve('37a')     
    184             sage: E.Lseries().sympow_derivs(1,16,2)      # optional -- requires precomputing "sympow('-new_data 2')" 
    185             ... 
    186             1n0: 3.837774351482055E-01 
    187             1w0: 3.777214305638848E-01 
    188             1n1: 3.059997738340522E-01 
    189             1w1: 3.059997738340524E-01 
    190             1n2: 1.519054910249753E-01 
    191             1w2: 1.545605024269432E-01 
     184            sage: print E.Lseries().sympow_derivs(1,16,2)      # optional -- requires precomputing "sympow('-new_data 2')" 
     185            sympow 1.018 RELEASE  (c) Mark Watkins --- see README and COPYING for details 
     186            Minimal model of curve  is [0,0,1,-1,0] 
     187            At 37: Inertia Group is  C1 MULTIPLICATIVE REDUCTION 
     188            Conductor is 37 
     189            sp 1: Conductor at 37 is 1+0, root number is 1 
     190            sp 1: Euler factor at 37 is 1+1*x 
     191            1st sym power conductor is 37, global root number is -1 
     192            NT 1d0: 35 
     193            NT 1d1: 32 
     194            NT 1d2: 28 
     195            Maximal number of terms is 35 
     196            Done with small primes 1049 
     197            Computed:  1d0  1d1  1d2 
     198            Checked out:  1d1 
     199             1n0: 3.837774351482055E-01 
     200             1w0: 3.777214305638848E-01 
     201             1n1: 3.059997738340522E-01 
     202             1w1: 3.059997738340524E-01 
     203             1n2: 1.519054910249753E-01 
     204             1w2: 1.545605024269432E-01 
    192205        """ 
    193206        from sage.lfunctions.sympow import sympow 
  • sage/schemes/elliptic_curves/sha.py

    r6775 r7000  
    5555 
    5656    A rank 5 curve: 
    57             sage.: EllipticCurve([0, 0, 1, -79, 342]).sha().an_numerical(prec=10, proof=False)          # long time -- about 1 minute! 
    58                 1.0                 
     57            sage: EllipticCurve([0, 0, 1, -79, 342]).sha().an_numerical(prec=4, proof=False)          # long time -- about 30 seconds. 
     58            1.0                 
    5959        """ 
    6060        try: 
     
    241241            trac #635, this strangely switched sign to become 40 + O(41). 
    242242            I'm not sure whether this indicates a bug, possibly a normalisation issue. 
    243             sage.: EllipticCurve('123a1').sha().an_padic(41) #rank 1    (long time) 
     243            sage: EllipticCurve('123a1').sha().an_padic(41) #rank 1    (long time) 
    244244            1 + O(41) 
    245245            sage: EllipticCurve('817a1').sha().an_padic(43) #rank 2    (long time) 
     
    250250            sage: EllipticCurve('34a1').sha().an_padic(5) # rank 0     (long time) 
    251251            1 + O(5^3) 
    252             sage.: EllipticCurve('43a1').sha().an_padic(7) # rank 1    (very long time -- not tested) 
     252            sage: EllipticCurve('43a1').sha().an_padic(7) # rank 1    (very long time -- nearly a minute) 
    253253            1 + O(7) 
    254254            sage: EllipticCurve('1483a1').sha().an_padic(5) # rank 2   (long time) 
  • sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py

    r5451 r7000  
    5151            sage: C._points_fast_sqrt() 
    5252            [(0 : 1 : 0), (0 : 5 : 1), (0 : 8 : 1), (1 : 1 : 1), (1 : 12 : 1), (3 : 3 : 1), (3 : 10 : 1), (4 : 1 : 1), (4 : 12 : 1), (6 : 2 : 1), (6 : 11 : 1), (7 : 1 : 1), (7 : 12 : 1), (8 : 4 : 1), (8 : 9 : 1), (9 : 4 : 1), (9 : 9 : 1), (12 : 5 : 1), (12 : 8 : 1)] 
    53             sage.: set(C._points_fast_sqrt()) == set(C._points_cache_sqrt())   # TODO -- fix this. 
     53            sage: set(C._points_fast_sqrt()) == set(C._points_cache_sqrt()) 
    5454            True 
    5555        """ 
  • sage/schemes/plane_curves/affine_curve.py

    r5176 r7000  
    288288            [(0, 1), (1, 2), (2, 3), (3, 4), (4, 0)] 
    289289 
    290         This next example crashes Singular with an out of memory error 
    291         when run from doctests (so it is currently not run), though it 
    292         works fine from the command line.  (TODO) 
    293          
    294290            sage: x, y = (GF(17)['x,y']).gens() 
    295291            sage: C = Curve(x^2 + y^5 + x*y - 19) 
    296             sage.: v = C.rational_points(algorithm='bn') 
    297             sage.: w = C.rational_points(algorithm='enum') 
    298             sage.: len(v) 
     292            sage: v = C.rational_points(algorithm='bn') 
     293            sage: w = C.rational_points(algorithm='enum') 
     294            sage: len(v) 
    299295            20 
    300             sage.: v == w 
     296            sage: v == w 
    301297            True 
    302298        """ 
  • sage/server/notebook/sagetex.py

    r6790 r7000  
    1010 
    1111    EXAMPLES: 
    12         sage.: sagetex('foo.tex') 
    13         pops up web browser with live version of foo.tex. 
     12        sage: sagetex('foo.tex')        # not tested 
     13        [pops up web browser with live version of foo.tex.] 
    1414    """ 
    1515    if not os.path.exists(filename): 
  • sage/server/notebook/test_notebook.py

    r5208 r7000  
    11r"""nodoctest 
     2 
     3THIS IS NOT USED ANYMORE -- should be deleted -- refers to very old version of notebook. 
     4 
    25Test the notebook to analyze how it is behaving 
    36after making some changes to it. 
     
    69run with the below command:  
    710 
    8 sage.: notebook(log_server=True) 
     11    sage: notebook(log_server=True)   # not tested 
    912 
    1013we then take the resulting 'server_log' and: 
     
    9093        notebook that had been run in the following way: 
    9194 
    92         sage.: notebook(log_server=True) 
     95        EXAMPLES: 
     96           sage: notebook(log_server=True)    # not tested 
    9397        """ 
    9498        #get the test notebooks log 
  • sage/server/notebook/tutorial.py

    r6541 r7000  
    2626beautiful antialised images.  To try it out immediately, do this: 
    2727 
    28     sage.: notebook(open_viewer=True) 
     28    sage: notebook(open_viewer=True)          # not tested 
    2929    the sage notebook starts... 
    3030 
  • sage/structure/sage_object.pyx

    r6178 r7000  
    128128 
    129129        EXAMPLES: 
    130             sage.: f = x^3 + 5 
    131             sage.: f.save('file') 
    132             sage.: load('file') 
     130            sage: f = x^3 + 5 
     131            sage: f.save(SAGE_TMP + '/file') 
     132            sage: load(SAGE_TMP + '/file.sobj') 
    133133            x^3 + 5 
    134134        """ 
     
    404404    NOTE: There is also a special SAGE command (that is not 
    405405    available in Python) called load that you use by typing 
    406                 sage.: load filename.sage 
     406     
     407                sage: load filename.sage           # not tested 
     408                 
    407409    The documentation below is not for that command.  The documentation 
    408410    for load is almost identical to that for attach.  Type attach? for 
Note: See TracChangeset for help on using the changeset viewer.