Changeset 7731:26e90216c47d


Ignore:
Timestamp:
12/15/07 05:39:17 (5 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

trac #1425 additional work based on refereeing the patch.

Location:
sage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sage/calculus/calculus.py

    r7730 r7731  
    99 
    1010EXAMPLES: 
    11  
    1211    The basic units of the calculus package are symbolic expressions 
    1312    which are elements of the symbolic expression ring (SR). There are 
     
    142141        sage: float(z) 
    143142        4.6467837624329356 
     143 
     144 
     145    We test pickling: 
     146        sage: x, y = var('x,y') 
     147        sage: f = -sqrt(pi)*(x^3 + sin(x/cos(y))) 
     148        sage: bool(loads(dumps(f)) == f) 
     149        True 
    144150 
    145151COERCION EXAMPLES: 
     
    185191 
    186192TESTS: 
    187 We test pickling: 
    188     sage: f = -sqrt(pi)*(x^3 + sin(x/cos(y))) 
    189     sage: bool(loads(dumps(f)) == f) 
    190     True 
    191193 
    192194Substitution: 
     
    203205    sqrt(2.000000000000000e-6*k + 12) 
    204206    sage: sqrt(c^3) 
    205     (2.000000000000000e-6*k + 12)^(3/2) 
     207    sqrt((2.000000000000000e-6*k + 12)^3) 
    206208 
    207209The symbolic Calculus package uses its own copy of Maxima for 
     
    233235is different than the one in the interactive interpreter. 
    234236 
     237 
    235238""" 
    236239 
     
    261264# The calculus package uses its own copy of maxima, which is 
    262265# separate from the default system-wide version. 
    263 maxima = Maxima() 
     266maxima = Maxima(init_code = ['display2d:false; domain: complex;']) 
    264267 
    265268from sage.misc.sage_eval import sage_eval 
     
    64486451syms_default = dict(syms_cur) 
    64496452 
    6450  
  • sage/interfaces/maxima.py

    r7518 r7731  
    378378        return Expect.__call__(self, x) 
    379379         
    380     def __init__(self, script_subdirectory=None, logfile=None, server=None): 
     380    def __init__(self, script_subdirectory=None, logfile=None, server=None, 
     381                 init_code = None): 
    381382        """ 
    382383        Create an instance of the Maxima interpreter.    
     
    389390        if not os.path.exists(STARTUP): 
    390391            raise RuntimeError, 'You must get the file local/bin/sage-maxima.lisp' 
     392        if init_code is None: 
     393            init_code = ['display2d : false'] # no ascii art output 
    391394        Expect.__init__(self, 
    392395                        name = 'maxima', 
     
    397400                        restart_on_ctrlc = False, 
    398401                        verbose_start = False, 
    399                         init_code = ['display2d : false',  # no ascii art output 
    400                                      #'load("mactex-utilities")'   # latex instead of plain tex from tex command (broken in maxima-5.11.0!) 
    401                                      ], 
     402                        init_code = init_code, 
    402403                        logfile = logfile, 
    403404                        eval_using_file_cutoff=eval_using_file_cutoff) 
Note: See TracChangeset for help on using the changeset viewer.