X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fsymbolic.py;fp=mjo%2Fsymbolic.py;h=d2a13298bb74dfbcc18a15434b6427d9aaf911cf;hb=265daef10f8bc8d84263f94b8401e22bdb8adf8d;hp=e4c6d23faef7117bcd7807da3d95d84a39fd18ad;hpb=e15316c191095ad432b6e28148bee01df6ffebc5;p=sage.d.git diff --git a/mjo/symbolic.py b/mjo/symbolic.py index e4c6d23..d2a1329 100644 --- a/mjo/symbolic.py +++ b/mjo/symbolic.py @@ -9,7 +9,23 @@ def set_simplification_domain(d): INPUT: - - d -- The domain, either 'real' or 'complex'. + - ``d`` -- The domain, either 'real' or 'complex'. + + TESTS: + + With the default 'complex' domain, we don't simplify this:: + + sage: (abs(x)^2).simplify() + abs(x)^2 + + But in the 'real' domain, we do:: + + sage: set_simplification_domain('real') + 'real' + sage: (abs(x)^2).simplify() + x^2 + sage: set_simplification_domain('complex') + 'complex' """ cmd = 'domain: %s;' % d