From: Michael Orlitzky Date: Mon, 4 Mar 2013 23:58:59 +0000 (-0500) Subject: Add doctests for set_simplification_domain(). X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=265daef10f8bc8d84263f94b8401e22bdb8adf8d;p=sage.d.git Add doctests for set_simplification_domain(). --- 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